Skip to Content
0
Jan 15, 2012 at 01:55 PM

Generating random number

521 Views

Hi guys,

I have a requirement..file to jdbc...where in we have an ordernumber field coming in a file for whch we need to randomly generate a num and post that to filed in oracle database....number should start with 888 followed by 8 digits..i hv put a counter after 888 and its generating an UNIQUE number...8880000000,8880000001,8880000002...etc.

if i have a file with 10 order numbers..i am getting 10 different unique numbers which ends with 88800000010....

Now the problem is when i get a second file from source, again it starting from 0, i.e 8880000000. which shouldnt happend..becaue it is already used and posted in databse....i need to generate an unique number again which starts wiht 888..

How can i achieve this??

regards

Edited by: ayrahcaanilan on Jan 15, 2012 2:56 PM