Home » Developer & Programmer » Forms » creating and checking a sequence
creating and checking a sequence [message #82420] Mon, 26 May 2003 04:14
HG
Messages: 13
Registered: December 2002
Junior Member
Hi,
I have a problem, in my forms developer application i need to make a sequence (if it doesn't excist anyway). This seq. has a number, this number also excists as a part of a textfield.
Eg.
Textfield: Nr29
I need to chech if there is allready a sequence called A29_seq and if it doesn't i need to make it, and fill a field Text2 with the next value.
This is wath i tried to create the seq.:
DECLARE
numm number(2);
seq_name varchar(3);
stat varchar(200);
BEGIN
numm := substr(:blok1.textfield,3,2);
seq_name := 'A' || numm || '_seq';
stat := 'create sequence ' || seq_name || ' start with 1'
forms_ddl(stat);
END;
If a don't use seq_name in the statement, it works, but it doesn't when its in the statement.
Can someone tell me how i can check if the sequence allready excists and how i can create it if it doesn't and fill in the new value in the field.
Thanx a lot.
HG(the novice)
Previous Topic: Help(block)..
Next Topic: forms4.5
Goto Forum:
  


Current Time: Fri Apr 26 19:54:19 CDT 2024