Il giorno mer, 07/03/2007 alle 18.25 +0100, Giuseppe Sacco ha scritto:
> Hi Heikki,
[...]
> > CREATE SEQUENCE fooseq MINVALUE 10000000 MAXVALUE 19999999 NO CYCLE
>
> This is the same solution I was thinking of, and probably the best one.
> I checked that currently the application only loops an average of 4
> times, so I don't have a real urgency of switching to sequences. I will
> implement this code in two weeks from now, since I should have enough
> time.
[a bit off topic]
Just for the records: sql-server doesn't accept the max() solution, so I
will have to implement the sequence way very quickly. The error I get
is: errorCode=1046, sqlState= S1000 "Subqueries are not allowed in this
context. Only scalar expressions are allowed" :-)
Again, thanks to all,
Giuseppe