473,322 Members | 1,522 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Sql insert cursor

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
2 3793
iburyak
1,017 Expert 512MB
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
GabeM
7
Iburyak, I think I got a solution. Thank you for replying!

-Gabe
May 13 '09 #3

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

Similar topics

11
by: grumfish | last post by:
I'm trying to add a row to a MySQL table using insert. Here is the code: connection = MySQLdb.connect(host="localhost", user="root", passwd="pw", db="japanese") cursor = connection.cursor()...
2
by: yurps | last post by:
Hi I have a weird problem I want to cursor thru the values in a temporary table and use the values to do a select statement to insert into another temporary table...This select statement uses a...
3
by: David Mitchell | last post by:
Hello, I am a complete beginner with Python. I've managed to get mod_python up and running with Apache2 and I'm trying to a simple insert into a table in a MySQL database. I'm using the...
3
by: Developer | last post by:
I use the RichTextBox and sometimes put it into overwrite mode. I'd like the cursor to show whether its in overwrite or insert mode. I often use Cursor.Current = Cursors.WaitCursor and...
7
by: David Bear | last post by:
I have a dictionary that contains a row of data intended for a data base. The dictionary keys are the field names. The values are the values to be inserted. I am looking for a good pythonic...
1
by: peteh | last post by:
Hi All; I have a 2.5mm row table (very wide columns) on an UDB v8.2.3 (DPF - 6x10) AIX box. We were doing some performance testing to determine the pros and cons of delete/insert vs load from...
4
by: mathon | last post by:
Hello, im currently implementing a binary search tree means, that a greater number than root will be added as right child and a less number as left child. My insert function looks currently like...
14
by: Ben | last post by:
I don't know whether anyone can help, but I have an odd problem. I have a PSP (Spyce) script that makes many calls to populate a database. They all work without any problem except for one...
6
by: eighthman11 | last post by:
Hi everyone: Using Sql Server SQL 8 I'm trying to INSERT records into a "can software package" batch table. I have a work-table that mimics the batch table. After manipulating the records in...
6
by: Abandoned | last post by:
Hi.. I use the threading module for the fast operation. But i have some problems.. This is my code sample: ================= conn =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.