Hi Tim1
My temporary table is "#x_temp".
My Spare Field is "counter", set to zeros on creation.
If I write : -
update #x_temp
set counter = (select max(t2.counter) + 1 from #x_temp t2)
then all the rows have counter set to 1.
If I leave out the 2nd reference to #x_temp, I...
Tim
I am doing my processing from within a Stored Procedure, using SELECT bla bla INTO Temporary Table from bla bla.
Can "Sequenced Columns" be set-up for a Temporary Table's column, within such a scenario ?
I have Sybase Books ONLINE, & SQL Server 11 .0 Generic / Reference Manual...
Hi.
My table is in the order I want it to be, but I need to update a spare field in each row with an incremental counter, so that I can do an "order by".
ie Field1 Field2 Spare Field
Row 1 AAA 02 17 2001 Set value to 1
Row...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.