469,582 Members | 2,124 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,582 developers. It's quick & easy.

seqnum generation!!

4
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.. :)
Dec 19 '06 #1
0 1223

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

51 posts views Thread by Mudge | last post: by
8 posts views Thread by Max M | last post: by
reply views Thread by Rasmus Fogh | last post: by
9 posts views Thread by Hayato Iriumi | last post: by
1 post views Thread by George Meng | last post: by
3 posts views Thread by Eddy Ilg | last post: by
31 posts views Thread by eliben | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.