July 13, 2011 at 2:29 pm
Hello
I´ve a table
TURNO (numetic)
DATE (date)
b1comp (numetic)
b2com (numetic)
....
i´ve this query to insert values into this table, my only problem is to figure a way to always on the last insert row incremment the turno number ( like turno=turno+1)
every row on the table should have a unique TURNO number
123,124,125,(...)
please help
July 13, 2011 at 2:43 pm
Did you consider using the IDENTITY(1,1) option for the column?
(please note that there might be gaps due to invalid inserts or deleted rows).
If you need to have the values in sequence, search this site for "sequence table" or post back with a few more details.
July 13, 2011 at 3:42 pm
tks a lot!
just see how to do it
...always learning!
July 13, 2011 at 7:45 pm
Please don't double post. This is essentially the same question I answered here.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply