By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,266 Members | 1,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,266 IT Pros & Developers. It's quick & easy.

Sql insert cursor

P: 7
Here is my situation that I am presenting.

I have a table "WebOrders" that is located in a database called SC and I want to insert the data into another table called CustomerOrder located in a database called SMS. The WebOrders must be inserted into the SMS.CustomerOrder table but incremented starting by the last entry in a column called Order_No. Order_No is in the following format GSA7667 NVARCHAR(10). How can I do this with a cursor?

TIA -Gabe
May 12 '09 #1
Share this Question
Share on Google+
2 Replies

Expert 100+
P: 1,017
Can you order by date in descending order instead of ID??
Try to use cursors as little as possible you can insert whole table in one shot why would you use cursor for that?
May 12 '09 #2

P: 7
Iburyak, I think I got a solution. Thank you for replying!

May 13 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.