I am trying to insert data from one table to another using the query below
Table
Table
The above query runs fine using control center for DB2 version 8 on AIX.
But on actually viewing the data within table SORT_KEY_TEMP2
, I find that the 'SK_SORT_KEY' column contains no data.
First and foremost it is suprising that DB2 does not throw any warning or error to report this data loss
Second is there a suggested alternate way of accomplishing this thing.
The data in SK_SORT_KEY is a sequence of bytes stored as VARCHAR.
Code:
INSERT INTO SORT_KEY_TEMP2 (SELECT * FROM SORT_KEYS ORDER BY SK_PAGE_ID FETCH FIRST 100 ROWS ONLY);
Code:
SORT_KEY_TEMP2 Name Data type Length Nullable SK_PAGE_ID CHARACTER 8 Yes SK_LAUNCH_DATE TIMESTAMP 10 Yes SK_LIST_TYPE CHARACTER 1 Yes SK_SORT_KEY VARCHAR FOR BIT DATA 1000 Yes SK_ALPHA_GROUP VARCHAR 5 Yes
Table
Code:
SORT_KEYS Name Data type Length Nullable SK_PAGE_ID CHARACTER 8 Yes SK_LAUNCH_DATE TIMESTAMP 10 Yes SK_LIST_TYPE CHARACTER 1 Yes SK_SORT_KEY VARCHAR 1000 Yes SK_ALPHA_GROUP VARCHAR 5 Yes
The above query runs fine using control center for DB2 version 8 on AIX.
But on actually viewing the data within table SORT_KEY_TEMP2
, I find that the 'SK_SORT_KEY' column contains no data.
First and foremost it is suprising that DB2 does not throw any warning or error to report this data loss
Second is there a suggested alternate way of accomplishing this thing.
The data in SK_SORT_KEY is a sequence of bytes stored as VARCHAR.
Comment