SqlDbx Forum

SqlDbx

You are not logged in.

#1 2016-07-24 15:37:11

timeco
Member

Invalid virtual column and comments with hyphens table script

Hi,

1. Virtual columns
I noticed an error when trying to execute a script generated using "Script Create" on a table which contains calculated (virtual) columns. Here's an example of an original table creation script:

CREATE TABLE TEST_PROC1
(
RUN_START            TIMESTAMP,
RUN_END              TIMESTAMP,
RUN_DURATION         INTERVAL DAY TO SECOND GENERATED ALWAYS AS (RUN_END-RUN_START)
)

Sqldbx generates this script, which produces an error. All virtual columns should contain the "generated always" keyword, which woud eliminate the problem.

CREATE TABLE TEST_PROC1
(
RUN_START            TIMESTAMP,
RUN_END              TIMESTAMP,
RUN_DURATION         INTERVAL DAY(2) TO SECOND(6) DEFAULT ("RUN_END"-"RUN_START")DAY(9) TO SECOND(6)
)

2. Comments with hyphens
When inserted a comment like this:

COMMENT ON COLUMN TEST.col1  IS 'Uncool comment with a '' ';

Sqldbx generates a single hyphen which produces an error:

COMMENT ON COLUMN POTUSER.TEST.COL1 IS 'Uncool comment with a ' '; 

Should be doubled or escaped to avoid problems.

Thanks so much,
Goran

Offline

#2 2016-08-11 10:46:05

sqldbxhelp
Administrator

Re: Invalid virtual column and comments with hyphens table script

This will be fixed in a next release

Offline

Board footer

Powered by FluxBB