CREATE DISTINCT TYPE MONEY AS DECIMAL(19 , 2) WITH COMPARISONS; DECLARE GLOBAL TEMPORARY TABLE SESSION.TEST_TYPE ( EMPLOYEE_ID INTEGER NOT NULL, EMP_NAME VARCHAR(50) NOT NULL WITH DEFAULT, SALARY MONEY NOT NULL WITH DEFAULT )NOT LOGGED ON COMMIT PRESERVE ROWS;
I got the below message:
SQL0350N The column "SALARY" was implicitly or explicitly referenced in a
context where the data type of the column is not supported. SQLSTATE=42962
SQL0350N says that i cannot have LOB, LONG VARCHAR, LONG VARGRAPHIC, XML or structure datatype in a created temporary table, and mine is none of those - neither the source datatyoe is any of those "non permitted" types. Not sure why this is failing.
We are on 9.7 fp4 on AIX. Any inputs directions will greatly help !!
thanks in advance