Re: Semaphore Locking Operation IN INFORMIX OnLine 7.1 Stored P
Posted in 1997
On 20 Jun 97 at 19:44, Sean wrote: > I am involved in the migrations of an Oracle 7.x application > to an Informix Online 7.1 Database. One of the requirements is for > implementing something that acts like an Oracle sequence. > (for those of you who haven't dealt with these objects > they behave something like this > Once created: > SELECT <sequence_name>.Nextval > FROM DUAL; Will return the next value of > the sequence an update the next value by an increment > value defined when the sequence is created.) > > I have figured out a way on paper to do these using a table and > stored procedures Something like this: Whoa!! :-) If your sequence increments by one, look into the SERIAL datatype. Your observations on FOR UPDATE cursors is correct, they need to be in a transaction, however stored procedures can have transactions. Perhaps you're not looking at the correct manual. I don't have any manuals handy, but I think the correct one is called something like "Guide to SQL Reference" HTH. -- Ciao, Billy Nose to the ground and ear to the grindstone in: Kuwait