Topic
  • 1 reply
  • Latest Post - ‏2012-02-07T17:32:48Z by SystemAdmin
BlueV
BlueV
3 Posts

Pinned topic distinct data type not supported with temporary tables ?

‏2012-01-19T16:21:16Z |
I'm trying to declare a temporary table using a distinct datatype and got a -350 SQL error (SQL0350N). Here is what I was trying to do.

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
-vj
Updated on 2012-02-07T17:32:48Z at 2012-02-07T17:32:48Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1731 Posts

    Re: distinct data type not supported with temporary tables ?

    ‏2012-02-07T17:32:48Z  
    have you tried without the not null with default clause?

    maybe you should contact ibm about his one