MySQL Forums
Forum List  »  IBM DB2

seq num generation11
Posted by: peter
Date: December 18, 2006 08:34PM

Hi frends
All of u have been really helpful in suggestions..here wud like to ask for one more help

In DB2 STORE PROCEDURES im trying value of sequencely generated number to a variable seqnum which i have to use in the naming convention.
I am trying it this way

CREATE SEQUENCE sample_SEQ
| START WITH 0
| INCREMENT BY 1
| NO MAXVALUE
| NO CYCLE
| CACHE 20;
|
select (NEXT VALUE FOR SAMPLE_SEQ) into seqnum from sample_seq;
|
CAN SOMEONE KINDLY SUGGEST IF I M DOINT IT IN THE RITE WAY OR IS THR NEOTHER WAY TO DO IT... im writing the output of this SQL SP to txt files which would be recognized by their unique seq no...

Thanks in advance.. :)

Options: ReplyQuote


Subject
Views
Written By
Posted
seq num generation11
7594
December 18, 2006 08:34PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.