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 to create an insert query to add records to a database which has a password.
Login scripts not working between domains with a trust
Print HTML File Issue
Can't Open Reports
Exchange 2010: 550 5.7.1 Client does not have permissions to send as this sender
Windows Server 2008 File Server inaccessible from clients
"select where count" Access SQL query
Why is the Remote Install Tab not showing up in the active directory after I install RIS on a server?
Open a form going to a specific record based on an ID in subform
SQL Sorting Issue