|
-
Ampersand in SQL*PLus is used for substitution variable, and outside of PL/SQL block the variable my_session does not exist.
In 8i use EXECUTE IMMEDIATE to drop and recreate the sequence.
DECLARE
My_session Number(5);
BEGIN
SELECT MAX(SessionID) INTO My_session FROM My_user;
EXECUTE IMMEDIATE 'DROP SEQUENCE Myaw_SessionID';
EXECUTE IMEMDIATE 'CREATE SEQUENCE Myaw_SessionID START WITH '||to_char(my_session);
END;
/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|