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...