Hello Experts,
I need to extract an information from the current schema name and make it a default for a column value.
For example, I have the following schemas:
DAQ1DQ
DAQ2DQ
DAQ3DQ
DBQ1DM
I need to extract the digit at the position 4 and make it the default value for a column.
I tried :
CREATE TABLE t
(
a IDENTITY(1,1) NOT NULL,
b CHAR(10) DEFAULT SUBSTRING(CURRENT_SCHEMA,4,1)
)
but I m getting the following error:[Code: 7323, SQL State: 42883] [Vertica][VJDBC](7323) ERROR: Meta-functions cannot be used in default expressions
The documentation says that the system information function (including CURRENT_SCHEMA) are supported as expressions.
is there any other way to be able to use current schema name (or part of it) in default expressions.
Many thanks.
Mkheir.