Relative Content

Tag Archive for oracle

Select an unaffected row from table to use in trigger

What I have is a database table CODE that is used to store various types of codes in the application. Due to customer requirements, I must now write a trigger on that table that creates a row to another table, that references two rows in the code table: the inserted/updated row and a second row.

find the missing sequence in Oracle DB

I have a table date, store code, do_no. some stores have missing sequence number. Data looks like Source. I’m not able to find missing doc_no in all stores. Each store doc_no start digit is different. STO1 starts wth 1, ST02 start with 2,ST03 3 etc..