Questions tagged [virtual-column]

A column that is not existing in a table of the database, but that is calculated at access time.

A column that is not existing in a table of the database, but that is calculated at access time.

50 questions
0
votes
3 answers

Show min value of duplicate row value as column value

More detailed question. I have a table called CALCS with the structure: code is the record identifier (not unique) value1, value2, value3,value4 are different values to sum price is the cost of work I must return price+value1+value2+value3+value4…
oraculo
  • 13
  • 4
0
votes
0 answers

How to add Where condition on Virtual column in Typeorm

Can someone help me in below query I always get x.salesChannel as Unknown column SELECT Column1, Column2, ( SELECT CASE WHEN `cr`.`CRColumn` is not null AND `cr`.`CRColumn` <= `ca`.`caColumn` THEN…
Manjari
  • 1
  • 3
0
votes
0 answers

Making a tricky mysql virtual column

am trying to use mysql virtual columns feature to achieve a search mechanism where i have booking numbers may be a real integer like 101 or an alpha numeric as A101 , B101 etc. So i do need to make a search mechanism where the use will input 101 and…
0
votes
1 answer

Create a virtual column and index to optimize a filter for an array in a JSON column

Here is the microsoft document for how to optimize a json column with out using OpenJson and only using Json_Value: https://learn.microsoft.com/en-us/sql/relational-databases/json/index-json-data?view=sql-server-ver15 My issue is that I have a JSON…
0
votes
0 answers

Oracle Function-based index v/s Virtual column based index performance

I have a production table that has 2.5 Billion rows. It has a column "created_date", which has both date and time components. The table is not partitioned. I have to export 2 months of data based on the "created_date" value. My options are either…
Jay
  • 47
  • 11
0
votes
1 answer

Oracle SQL how to make database calculate a column?

I want to make database calculate a column. For example: There is a column named 'price'. every time I insert a new value into the price, I want another column named 'percent' automatically calculate 1% of the new value. Like this; Price …
Ozgeozcn
  • 9
  • 3
0
votes
0 answers

Can't make insert with JPA when table Id has virtual column

I have to map a table using JPA, but this table has a multicolumn key with some of that as Oracle virtual columns. When I try to make the insert, Hibernate (the implementation of JPA that I've used) return to me this error: "ORA-54013: INSERT…
0
votes
0 answers

Update column into Virtual Columns oracle

I would like to modify an existing column of my table in a virtual column. By opening the "SQL" tab in Oracle SQL Developer, the current column is (table DDL): "ENABLED" NUMBER(1,0) DEFAULT '1' I would like to convert this column to a virtual…
Maurizio Rizzo
  • 747
  • 1
  • 7
  • 11
0
votes
0 answers

How to create virtual columns in Teradata?

Is it possible to create virtual columns in Teradata, that is, columns based on the values of another columns of the same table, for example: CREATE SET TABLE TEST.ZZ_RECEIPTS, NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, …
RufusSC2
  • 253
  • 2
  • 9
0
votes
0 answers

Why XMLType of Oracle is always virtual

I'm working with Oracle table containing column of XMLType. I found that it is virtual but when I was creating the table the column was not marked with "virtual" property. So my question is why this column is virtual in ALL_TAB_COLS and is it…
Denis
  • 129
  • 1
  • 4
  • 12
0
votes
1 answer

How to create MySql VIRTUAL Column that have query string value in it

Let me explain . I have a json data set with values something like this: "clientRequest": { "uri": "/flow.php?id=FS-6097&utm_source=facebook&utm_medium=cpc&utm_term=cold", "body": null, "bytes": 608, "flags": 1, …
RashFlash
  • 992
  • 2
  • 20
  • 40
0
votes
1 answer

How to check from where the column value is populating

I have table TEST_ORD where i have column ORD_DAYID which is virtual column. I want to know from where and how the value in this coumn is populating. Because i cant use this column in insert statement as it is virtual column. I tried the below query…
Andrew
  • 3,632
  • 24
  • 64
  • 113
0
votes
0 answers

Delete record hangs when virtual auto generate column created on same

I have a table T1 with a virtual column V1 which is generated automatically based on some condition and also a foreign key is created with Column C1 of table T2. Now when table T1 is locked and I try to delete record from table T2 then it is not…
0
votes
1 answer

Error Code: 3175. Cannot create index on virtual column whose base column has foreign constraint

In MySQL 5.7.11, adding a composite index where one of the columns is a virtual generated column results in the following error: Error Code: 3175. Cannot create index on virtual column whose base column has foreign constraint In reality, the base…
oulenz
  • 1,199
  • 1
  • 15
  • 24
0
votes
2 answers

Virtual Column using deterministic user defined function

I am using a virtual column (oracle 11g) with a deterministic user defined function which takes primary key of the row as parameter and returns a simple scalar value. the virtual columns updates without any problem but when i update the table it…
jaykio77
  • 379
  • 1
  • 7
  • 22