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 do i block port 25 on my vista laptop?
Subscription licences
Using an Access 2007 ADP does not support SQL Express 2008 for table design - Better to use an ACCDB?
Dot Matrix printing from vb.net
Sharepoint Portal Services Restore failure
Microsoft SQL 2005
multiple indexes on a single table
trouble with sorting columns on gridview in ASP.NET 2.0
Report Writer in Microsoft Dynamics GP
Web Account Login Problem