I have the following query
insert into tablex
select rowstamp, col1,col2,col4
Now the issue is that the rowstamp in the first table is significantly greater than the rowstamp in the destination and i am not sure i want this huge difference in my destination table.
Is there a way I can rowstamp the destination table with its next rowstamp and not the one from the source table.
Obviously i can't drop the rowstamp in the query or i get a message saying that i do not have enough columns.
Maybe a little more explanation is in order. How about data structures, sample data, a clear description of what you're trying to do?
In your application there must be a function that generates unique rowstamps. Use it in your insert's values clause.
I am about to do something similar. When a record is inserted in one table I need to insert a record in another table. I am going to have to snoop around the application's packages and see which function generates ct_recid (equivalent to your rowstamp). I will then use this function in an insert statement from a trigger.
if rowstamp is a nullable column...you can ignore rowstamp from the query by specifying column listing
insert into tablex (column1, column2, column3)
select col1, col2, col4
then use some logic based on tablex2 to populate rowstamp later.
My rowstamp column is not nullable. If i don't specify the rowstamp in my query than it throws up the message saying its not a nullable column.
I looked through the oracle online doco and can't find much. Pretty much stuck.
The table i am inserting into is a table that is continually getting rows inserted to is and hence its rowstamp increments. However i am not sure how to get it to increment from my own insert query.
Surely there must be something?
Mozart, like I said before there's either a sequence or a function that calls the sequence. You have to find it or you shouldn't be messing with this application.
Click Here to Expand Forum to Full Width