473,425 Members | 1,797 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,425 software developers and data experts.

SQL batch inserts into table

Soniad
66
I want multiple records to be inserted in table at one time. How do i do this?
Mar 22 '10 #1
5 2810
ck9663
2,878 Expert 2GB
Use INSERT ....SELECT...

Instead of INSERT....VALUES...

Happy Coding!!!

~~ CK
Mar 22 '10 #2
Soniad
66
Hi,

Thank you. i'll try this in my code.


Regards ,

"D"
Mar 23 '10 #3
Soniad
66
Hi,

If it was already a table from which i had to take values, then it could be easier. but the problem is,I post some id's comma seperated to one page there i want these id's to insert into table.since these id's are comma seperated i split it and thyen insert one by one using for loop.
So,I don't want to do it in for loop. is there any way to insert these comma seperated id's at one time



Regards ,

"D"
Mar 23 '10 #4
ck9663
2,878 Expert 2GB
Here's a pseudo-code...

1. Create a stored proc that receives an XML variable.
2. This XML variable can have a predefined or generic column names.
3. Read this XML as a resultset (table-looking result)
4. Insert the result of that resultset into your target table.
5. On your front-end, create a formatted-XML-looking string.
6. Pass that string to the newly created stored proc.

Happy Coding!!!

~~ CK
Mar 23 '10 #5
Soniad
66
Hi,

Thank you so much.

Regards,

"D"
Mar 30 '10 #6

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

Similar topics

3
by: deathyam | last post by:
Hi, I have an Excel 97 app in which I'm using SQL INSERTs to insert data into an Access 97 database table. The table structure is as follows: VersionID (PK) (Long) MetricID (PK) (Long)...
12
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens...
7
by: mark.a.lemoine | last post by:
Our application currently interfaces to SQL Server and Oracle, we're implementing it into DB2 currently and I have a question to ask. First a little background - We're interfacing into DB2 v8 on...
0
by: varac | last post by:
Hi list, I am new to mysql and would appreciate any advice that you have to offer. I am attempting to batch insert 100 rows into a table, and I need to know the 100 id's of all the inserted...
2
by: Private Pyle | last post by:
We are prototyping an application that is inserting 500 rows into a table. One method is to using batching and make one database call to insert all 500 rows, the other method is to make 500...
2
by: simonZ | last post by:
I create a transaction: sqlTran=sqlConn.BeginTransaction(IsolationLevel.Serializable); Then, I insert some data into report table with sqlCommand object: oCmd = new...
4
ck9663
by: ck9663 | last post by:
hi guys this is a little challenging, at least for me...here goes... i have to run a DOS batch file from a server. with some parameters that i need to pass. these parameters can be found on a...
18
by: Charles Law | last post by:
I have a sproc that returns data from a table using a simple SELECT. There are quite a few rows returned, e.g. ~150,000. In my first application, I use a reader on the sproc and iterate through...
3
by: Amber | last post by:
We are using 8.2.9 Windows 64 edtion, in one of our projects we need to recreate a few lager tables which have many millions of rows each, we have used concurrent Java threads to read from data...
1
by: =?Utf-8?B?S3Jpc2huYWthbnRo?= | last post by:
I have got a requirement as follows. I am having a table RCBL_ERROR in a database in DB2. I need to create a batch file, which has to extract the rows from this table and write those extracted...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.