Hi Harpeet/Dieter,
I have created a volatile table with a column rwid declared for rowid insertion.
- I cannot use Identity column as it may result in gaps and its a volatile table too.
- Use of CSUM is not recommended since it may affect the performance.
- ROW_NUMBER is not decisive as the columns in order by clause are not concluded.
I tried
'Insert into table1(col1,col2,....rwid)
SELECT a.col1,
a.col2,
...
1+(SELECT MAX(rwid) FROM table1)
FROM table2 a '
Its a Insert select statement.
Since MAX(rwid) returns null in case of no records in the table1 (initially), further additions result in null values only. Please suggest a possible solution on this.
Hi Harpeet/Dieter,
I have created a volatile table with a column rwid declared for rowid insertion.
- I cannot use Identity column as it may result in gaps and its a volatile table too.
- Use of CSUM is not recommended since it may affect the performance.
- ROW_NUMBER is not decisive as the columns in order by clause are not concluded.
I tried
'Insert into table1(col1,col2,....rwid)
SELECT a.col1,
a.col2,
...
1+(SELECT MAX(rwid) FROM table1)
FROM table2 a '
Its a Insert select statement.
Since MAX(rwid) returns null in case of no records in the table1 (initially), further additions result in null values only. Please suggest a possible solution on this.