TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Agarwal
NA
379
254.3k
How to update Identity Column from ROW_NUMBER in sql server
Apr 11 2014 8:07 AM
Hello,
How to update Identity Column from ROW_NUMBER in sql server 2008?
I am using this query for update but it's getting error:-
Cannot update identity column 'SNO'
set IDENTITY_INSERT tableSalesQuotation ON
update tableSalesQuotation
set
SNO=SubQuery.SNO
from
(SELECT Row_Number() OVER (ORDER BY SNO) as SNO
FROM tableSalesQuotation
) SubQuery
set IDENTITY_INSERT tableSalesQuotation OFF
please help me.
Thanks in Advance.
Ankit Agarwal
Software Engineer
Reply
Answers (
2
)
Multiple values in a column
how to convert sdf to mdf