72 lines
4.5 KiB
HTML
72 lines
4.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="task" />
|
|
<meta name="DC.Title" content="Load data into a table using SQL" />
|
|
<meta name="abstract" content="A simple method of loading data into a table is to use an SQL application and the SQL INSERT operation." />
|
|
<meta name="description" content="A simple method of loading data into a table is to use an SQL application and the SQL INSERT operation." />
|
|
<meta name="DC.subject" content="load data, using SQL" />
|
|
<meta name="keywords" content="load data, using SQL" />
|
|
<meta name="DC.Relation" scheme="URI" content="rbal1newdatatotables.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../sqlp/rbafykickoff.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="../db2/rbafzmst02.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rbal1tbldatasql" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Load data into a table using SQL</title>
|
|
</head>
|
|
<body id="rbal1tbldatasql"><a name="rbal1tbldatasql"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Load data into a table using SQL</h1>
|
|
<div><p>A simple method of loading data into a table is to use an SQL application
|
|
and the SQL INSERT operation.</p>
|
|
<div class="section"> <p>Consider a situation in which a Spiffy regional center needs
|
|
to add inventory items to a dealership's inventory table on a periodic basis
|
|
as regular inventory shipments are made from the regional center to the dealership.</p>
|
|
<pre>INSERT INTO SPIFFY.INVENT
|
|
(PART, DESC, QTY, PRICE)
|
|
VALUES
|
|
('1234567', 'LUG NUT', 25, 1.15 )</pre>
|
|
<p>The preceding statement
|
|
inserts one row of data into a table called INVENT in an SQL collection named
|
|
SPIFFY.</p>
|
|
<p>For each item on the regular shipment, an SQL INSERT statement
|
|
places a row in the inventory table for the dealership. In the preceding example,
|
|
if 15 different items were shipped to the dealership, the application at the
|
|
regional office could include 15 SQL INSERT statements or a single SQL INSERT
|
|
statement using host variables.</p>
|
|
<p>In this example, the regional center
|
|
is using an SQL application to load data into a table at an application server
|
|
(AS). Runtime support for SQL is provided in the <span class="keyword">i5/OS™</span> licensed
|
|
program, so the AS does not need the <span class="keyword">IBM<sup>®</sup> DB2<sup>®</sup> Query Manager and SQL Development Kit for iSeries™</span> licensed
|
|
program. However, the <span class="keyword">IBM DB2 Query Manager and SQL Development Kit for iSeries</span> licensed
|
|
program is required to write the application. </p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1newdatatotables.htm" title="You load data into a table by entering each data item into the table. On the iSeries server, you can use SQL, the DB2 Universal Database for iSeries Query Management function, or the data file utility portion of iSeries Application Development Tools to create applications that insert data into a table.">Load new data into the tables of a distributed relational database</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="../sqlp/rbafykickoff.htm">SQL programming</a></div>
|
|
</div>
|
|
<div class="relref"><strong>Related reference</strong><br />
|
|
<div><a href="../db2/rbafzmst02.htm">SQL reference</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |