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
how can I override the DateTime class to add a custom method??
Automatically run an application as another user
ms office oem vs licensing
Safe Mode
Exporting Access Query To Excel: Format Currency to Number
How to set a different sender address from Exchange 2007
Installing Exchange 2010, having issues passing the Readiness Check.
Having a weird Format Conditions problem...
List Box Sort
EXECUTE permission denied on object 'xp_cmdshell' How to Allow call from stored procedure called by asp page.