473,722 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DB2 Load into multiple tables using control centre


I am trying to use DB2 Control Centre (version 8.2) to load one flat
file into multiple tables. However, I don't see the options in Control
Centre that allows that.

Anyone knows how to do this?

DB2 Novice

Nov 12 '05 #1
8 3568
DB2 Novice wrote:
I am trying to use DB2 Control Centre (version 8.2) to load one flat
file into multiple tables. However, I don't see the options in Control
Centre that allows that.

Anyone knows how to do this?

DB2 Novice

In one shot using load.. No.
How do you distribute the data. Do you parition vertically (column 1 - n
to T1, rest to T2) or horizontally (some rows to T1 some rows to T2).
There are multiple options:
For vertical partitioning the simplest approach would be to just use two
LOAD commands
For horizontal partitioning I woudl load the fiel into a staging table
and then either run two loads from cursor or, if you want only one scan:
BEGIN ATOMIC
FOR row AS SELECT * FROM staging DO
INSERT INTO T1 SELECT * FROM TABLE(VALUES(ro w.c1, ...)) AS S WHERE
<cond1>;
INSERT INTO T2 SELECT * FROM .... <cond2>;
END
%

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

Thanks serge.
One more question on this Load or import. I believe the only that
really separate these tools is the speed. Either way, I believe my
accounting department people can still read the tables when I load or
import the data? I am just wondering
why load doesn't support one load into multiple tables like what DB2
import can do?

DB2 Novice

Nov 12 '05 #3
DB2 Novice wrote:
Thanks serge.
One more question on this Load or import. I believe the only that
really separate these tools is the speed. Either way, I believe my
accounting department people can still read the tables when I load or
import the data? I am just wondering
why load doesn't support one load into multiple tables like what DB2
import can do?

DB2 Novice

Uhm.. IMPORT does NOT support multiple targets in one shot. What I
posted was regular SQL.
Anyway the difference betwen IMPORT and LOAD is that IMPORT uses an SQL
interface ethat is it will fire trigger. And yes. It will be slower
There is an online LOAD capability and I think (?) similar options are
available for IMPORT. The way it works is that the loaded data remains
invisible until LOAD is completed and integrity of the data has been
verified by the SET INTEGRITY statement (to maintain e.g. RI, MQTs (aka
materialized/indexed views)

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #4
Load data is invisible til it's issued with set integrity. Waht about
the existing data? AFAIK, table lock is acquired for Load operation.

Nov 12 '05 #5
Ora Dummy wrote:
Load data is invisible til it's issued with set integrity. Waht about
the existing data? AFAIK, table lock is acquired for Load operation.


Quick lookup for Online Load in teh Information center:
"Online table load

When loading data into a table in Version 8, the table space in which
the table resides will no longer be locked. Users have full read and
write access to all the tables in the table space, except for the table
being loaded. For the table being loaded, the existing data in the table
will be available for read access if the load is appending data to the
table.

These new load features significantly improve the availability of the
data and help customers deal with the maintenance of large data volumes
and shrinking maintenance windows. "
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6
You cannot load into multiple tables using one command.
load into table one by one, specify the position in the file.
"DB2 Novice" <db*******@yaho o.com> wrote in message news:<11******* **************@ o13g2000cwo.goo glegroups.com>. ..
I am trying to use DB2 Control Centre (version 8.2) to load one flat
file into multiple tables. However, I don't see the options in Control
Centre that allows that.

Anyone knows how to do this?

DB2 Novice

Nov 12 '05 #7

Serge,

Thanks. That is for table lock for DB2 Load. However, those users who
are using
import utility is still not so fortunate to still read let alone write
while the table is being imported.
DB2 Novice

Nov 12 '05 #8
DB2 Novice wrote:
Serge,

Thanks. That is for table lock for DB2 Load. However, those users who
are using
import utility is still not so fortunate to still read let alone write
while the table is being imported.

Is that so? Check out online import:
http://publib.boulder.ibm.com/infoce...6f%72%74%22%20

Noe that all I do to find these thing sis type in the obvious search
patterns "online load" and "online import" into teh information center.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3255
by: Shabam | last post by:
A web application of mine developed using C# + MS SQL runs fine normally. However when I stress test it with a load testing software (using about 60 simultaneous users) some instances start erroring out. I see two different errors. One is a "Object reference not set to an instance of an object." error, which appears to always contain the same information, and the other is a "There is no row at position X.", where X is a number. Is this...
9
21644
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
8
10409
by: Jason L James | last post by:
Hi all, does anyone know if I can create a dataview from multiple datatables. My dataset is constructed from four separate tables and then the relationships are added that link the tables together. To make data entry easier I would like to combine selected columns from the four tables onto a single dataview that could be used as the datasource for a datagrid control. The distinct updates, insert ans delete
53
4227
by: Alan Silver | last post by:
Hello, I understand the issue that tables should be used for tabular data and not for layout, but I would like some clarification as to exactly what constitutes tabular data. For example, if I have a form, in which the user is required to fill in various bits of information, then laying out with a table makes it easy. A basic example...
3
1290
by: rodchar | last post by:
hey all, i have an employee master table that i've broken up into many tables using normalization and what made logical sense (i.e. Education table, Equipment table, military history table, etc. i think there may be about 8 tables). What i was wondering was when a user selects an employee to modify would i load all the tables up for that employee or would i just load the most used values? thanks,
5
4821
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up doing this demo with tables. The main problems are the vertical centering of the info area, and of the text inside the squares.
2
1717
by: Sean Staniforth | last post by:
I have a Database which contains anout 20 tables. each has different data. for a research centre studying Family History. I want to create a simple from end that researchers can entre a surname & First name to find their ancestor, this will give them reference number relation to the house Then they will want to clear the two names and enter the reference numbers (town / Village / house) that will give census details of those living at...
3
4152
by: ApexData | last post by:
I'm starting a new project. A Personnel System. I have considered opening a single bound form to the main employee table. The user can scroll the records to any individual. I would like to have a tab control at the top of the form which would allow the user to select (PERSONAL), (TRAINING),(DISIPLINARY),and (SICKLEAVE) Tabs. Each Tab should open a FORM and display the relavant TABLE of records tied to the Employee being viewed in the...
2
2722
by: ZBINContact | last post by:
I am creating a self-checking set of usercontrols. They tend to call their self-checking functionally in the "Load" event. I have run into a problem with my TextBox usercontrol, however, as the base component does NOT have a Load event as far as i can ascertain. What I need is to have a self-check function called when the component loads. I am currently using the "Layout" event but that can fire multiple times, and I can't just call...
0
8863
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9157
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6681
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5995
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.