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

store procedure to insert multiple records at a time into table?

i am new to db2 database , want to create a stored procedure for How to Insert entire DataTable into DB2 at once instead of row by row? please help me out with this.
Mar 20 '18 #1
1 2955
Frinavale
9,735 Expert Mod 8TB
Is the data you want to insert into the Data Table already in another Data Table (or tables)?

You can use the Select statement with the Insert statement like this:
Expand|Select|Wrap|Line Numbers
  1. Insert Into Table1(ColID, ColNumber, ColDate)
  2. Select tbl2ID, tbl2NO, tbl2Date FROM Table2
Mar 20 '18 #2

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

Similar topics

8
by: Sans Spam | last post by:
Greetings! I have a table that contains all of the function permissions within a given application. These functions are different sections of a site and each has its own permissions (READ, WRITE,...
4
by: Roy Adams | last post by:
Hi forum I have three text fields set up on a page that when submitted I want them to be inserted in to a table but in differnt records at once. the code below only seems to insert the last field...
0
by: Ian Macey | last post by:
I am wanting to Insert multiple records into a table, and although I have some working code I feel that there must be a better way. The purpose of the code is to do a directory listing of a...
12
by: shank | last post by:
I'm trying to use online samples for submitting multiple records from ASP into a stored procedure. Failing! Through the below form, a user could be submitting many records at a time. I'm not...
3
by: nkoriginal | last post by:
Hi: I want to create an store procedure for an ASP page. I've a form with 100 fields and I want to insert the information in: 1) one table with 100 rows or 2) in 5 tables Now, my idea is...
0
chumlyumly
by: chumlyumly | last post by:
Hello scripters - OS: Mac OSX Language: PHP w/ MySQL database I've created an insert page where a user inputs his info, which then goes to four different tables in a MySQL database. The...
1
by: visitram | last post by:
I am a newbie to Ruby and wondering how to insert multiple records at the same time. I want to create a form such that it accept multiple records and save it to DB upon submitting the form...
3
by: uma9 | last post by:
hi, the code below is used to insert a single record....i want to know how to insert multiple records using a "for" loop...please help Set connect = CreateObject ("ADODB.Connection")...
12
by: Blake Rice | last post by:
Hi everyone! This is my first time posting here, so here goes. THE SITUATION: I have a form that has a start date, end date, project number, and total volume. These values are pulled from another...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.