General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
In my applications that are already running for long time
and would be hard to modify, I am considering to use the code below
A random number would be added to the code to prevent duplications
Do you think 1 in 10,000 is good a range to prevent duplications ?
**************************************
add_code = Int(10000*Rand())
dimension lctemp[1]
select max(ap.id2) from ap ;
into array lctemp
lcTemp[1] = nvl(lcTemp[1],0)+1 + add_code
replace ap.id2 with lctemp
*********************************************
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only