Hi all. Working on a sql server to oracle migration of an existing DB (a few acually) and it seems like I'm going to have to use a combo of sequences and triggers to work some kind of 'autonumber' type of function.
My questions are the following...
If I have a table that is filled with data already, and I need a column to get populated with the sequence, is the fact that the column is already populated with numbers going to make things difficult? IE. let's say the ID column already has 20,30,40,60, etc..from SQL Server.
I want to move that table to oracle, and have the sequence continue from where THAT sequence left off....thoughts?
Also, when tryin to create the sequence with this code, i get the error shown at the bottom...what am I doing incorrectly?
SQL> create or replace trigger batch_seq
2 before insert on tbl_owr_batch
3 for each row
4 when (:new.id IS NULL)
6 select tbl_batch_seq
7 into :new.id
8 from dual;
when (:new.id IS NULL)
ERROR at line 4:
ORA-25000: invalid use of bind variable in trigger WHEN clause