Microsoft
Software
Hardware
Network
Question : autovalue t-sql sql server 2008
I've got a table with many fields.
One of them is the primary key and a second is a unique index named "LaufNr".
I want to make a insert select statement on this table.
The problem I have is that I have to set for each new dataset a unique "LaufNr" and I can't use auto increment. So I have to do it with a own function. Which methodes can I use?
Answer : autovalue t-sql sql server 2008
You can do it this way..
INSERT into ur_table
SELECT other_columns, row_number() over ( order by some_column) LaufNr
FROM ur_table
>> I have to set for each new dataset a unique "LaufNr" and I can't use auto increment
Kindly explain more on this..
Random Solutions
Forcing datasheet column headings onto 2 lines
Internet Drivers for IBM R51 Thinkpad
Help with formula in VBA for summing cells from two ranges into a third range
Cannot start the source application for the object
How di I programmatically delete an existing row in a datagridview
unlock the "local area connection' of windows xp
Looking for my context menu VS 2008
Page file limitations for Windows 2003 Enterprise
adprep.exe taking extremely long time
Connect to a Crosstab query in Access from Excel