Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Auto generating Sequences !!
>>>I think they have the docs in other languages. Do a search at
>>>otn.oracle.com
>>>Jim
Yes but unfortunately not in my language. I'm from SRI LANKA My language is "SINHALA"
I used following SQL (With Execute immediately code)
CREATE OR REPLACE TRIGGER ACCOUNT_T100
BEFORE INSERT
ON loan
FOR EACH ROW
DECLARE
seq_name VARCHAR2(10);
BEGIN
seq_name := 'seq_'; EXECUTE IMMEDIATE 'CREATE SEQUENCE' || seq_name ||' start with 1 increment by 1 maxvalue 99999999 minvalue 1 nocache nocycle noorder' ;END; Now I can create the trigger without error.!!!!
But When i try to insert new entry to loan table it says error in
executing trigger.
I can't understand what the wrong with it?
(here I'm trying only to create one sequence. that is to know how to
create sequence in a trigger.
But i will need dynamic name to sequence )
But now at least i can create trigger without error. I think i'm closer to solution.
please help me with your kind advices.
Thank!
I'm still learning execute immediately
Received on Tue Apr 11 2006 - 00:33:16 CDT