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
Simple excel question
Automatically backup a PST file without closing it.
Keyboard shortcut to close database window
GAL does not show when trying to Delegate in outlook 07
Installing MS-DOS 3.20 in Bochs
How do I retrieve text from a website
SQL 2005 Syntax Error 'CREATE USER'
Consuming a web service, importing the consumed xls file into a sql server database table
script to setup a silent install sqlserver 2008
Incorrect syntax near '#'. in ADODB.Connection in Excel workbook