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
1
vote
0 answers

Oracle Managed Data Access Bulk Copy Error pasing insert statement for table (virtual columns)

We've recently moved to use Oracle.ManagedDataAccess in our application now it supports Bulk Copy. The problem is it seems to have a hard time dealing with tables that have virtual columns where the unmanaged client did…
1
vote
1 answer

User Defined Function in generated column definition in MariaDB?

According the the documentation, MariaDB allows user defined functions to be used in generated column definitions https://mariadb.com/kb/en/generated-columns/ User-defined functions (UDFs) are supported in expressions for generated columns. However,…
Ryan
  • 132
  • 1
  • 11
1
vote
2 answers

How to copy data from TableA to TableB with new partitions?

I have TableA that has hundreds of thousands of rows and is still increasing in size. With no partitions, the speed has decreased very noticeably. So I made a new table called TableB made columns exactly like (both name and type) TableA in Oracle…
Jett
  • 781
  • 1
  • 14
  • 30
1
vote
1 answer

Virtual Column Issue with Oracle Forms

I have an Interface which's created with Oracle Forms. It has a base table block in which there's a field (namely col3"has the same name with the table's column that's derived from"). Form has two other fields col1 and col2 as of numeric type, and…
Barbaros Özhan
  • 59,113
  • 10
  • 31
  • 55
1
vote
2 answers

oracle table partition to have the latest record in one partition

I have a huge table with data and i need to partition the table based on the the below requirement. The records will be inserted every half an hour for each id.we have around 5000 id's. I have a id(datatype as number) and row_crt_dtm(datatype as…
user2899615
  • 31
  • 1
  • 1
  • 10
1
vote
2 answers

Mysql Generated Column Compued By Conditions On Other Columns

Is it possible to create a generated MySQL column that runs a condition on other columns? For example: column "a" - type boolean column "b" - type date generate column "c" that implements the logic: if (a == false) || (a == true && b < NOW()) { …
shugigo
  • 133
  • 1
  • 10
1
vote
0 answers

Why can't I concat a foreign key in a virtual column expression?

I have these two tables called "Timelines" and "Universes". In "Timelines" I have a column named "ID" which must be a combination of a Timeline's ID after the ID of its related Universe. For that reason I created a Stored Virtual Column to be the…
user8639775
1
vote
3 answers

Insert operation disallowed on virtual columns

I dont understand the below issue where i am trying to insert the query and getting error as Insert operation disallowed on virtual columns. I took a export from production in sql developer and i tried to run those insert statements in test…
Andrew
  • 3,632
  • 24
  • 64
  • 113
1
vote
1 answer

Usage of Oracle virtual column to increment value

This is an attempt to the test the usage of the VIRTUAL column with a function to increment the value in a column. I am using a function which would return the last two digits of the current year, concatenated with a hyphen followed by the next max…
Jacob
  • 14,463
  • 65
  • 207
  • 320
1
vote
1 answer

Oracle trigger depending on virtual column produces wrong data

I have this trigger create or replace trigger upd_totprc_trg after insert or update or delete of total_price on sales_detail for each row declare v_diff number := 0; v_master number; begin if inserting then v_master := :new.master_id; …
hermione
  • 35
  • 6
1
vote
1 answer

Using a function-generated column in the where clause

I have an SQL query, which calls a stored SQL function, I want to do this: SELECT dbo.fn_is_current('''{round}''', r.fund_cd, r.rnd) as [current] FROM BLAH WHERE current = 1 The select works fine, however, it doesn't know "current".…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
1
vote
1 answer

Oracle 11g Virtual Column derived from query

Is it possible to create a virtual column based off a query to another table? - something like the following DateTable DateDt StatusCd 7/31 8/1 CURRENT 8/2 8/5 8/6 8/7…
0
votes
0 answers

How to use VIRTUAL columns with TS in Sequelize?

I have a class Pin that has the basic structure: export default class Pin extends Model, InferCreationAttributes> { declare pinID: CreationOptional declare startingDate: Date declare endingDate: Date |…
STh
  • 746
  • 9
  • 24
0
votes
0 answers

aws hive virtual column in azure pyspark sql

I translate hive sql on AWS to pyspark sql on azure synapse. There is some hive virtual columns in SQL, I want convert to pyspark sql on azure synapse. How can I replace those columns? reference of hive virtual columns :…
wiz
  • 43
  • 7
0
votes
0 answers

Return virtual Postgres column after create

I have a Rails 7 model that uses Postgres' virtual column feature: create_table :time_entries do |t| # ... t.virtual :duration, type: :interval, as: %(("to" - "from")::interval), stored: true, null: false # ... end The problem is, that after…
23tux
  • 14,104
  • 15
  • 88
  • 187