473,326 Members | 2,061 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,326 software developers and data experts.

help load data using import utility

hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David
Nov 12 '05 #1
6 3366
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:
hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands

Nov 12 '05 #2
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:
hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands

Nov 12 '05 #3
thank you Anton but I didn't understand:
once the root table has been loaded how is possible the leaf table
knows every row's correct id_root to be loaded?

I'dont think is possible use the load utility.
I've read about using import to accomplish that. dont know how.

Anton Versteeg <an************@nnll.ibm.com> wrote in message news:<c7***********@sp15en20.hursley.ibm.com>...
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:
hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David

Nov 12 '05 #4
thank you Anton but I didn't understand:
once the root table has been loaded how is possible the leaf table
knows every row's correct id_root to be loaded?

I'dont think is possible use the load utility.
I've read about using import to accomplish that. dont know how.

Anton Versteeg <an************@nnll.ibm.com> wrote in message news:<c7***********@sp15en20.hursley.ibm.com>...
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:
hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David

Nov 12 '05 #5
Apparantly you have established some link between the tables.
I assumed it was the physical sequence of the load/import files.
If that is not the case then you should probably consider using
'generated by default' in stead.
In that case the identity values can be part of the load/import file.

da****@libero.it wrote:
thank you Anton but I didn't understand:
once the root table has been loaded how is possible the leaf table
knows every row's correct id_root to be loaded?

I'dont think is possible use the load utility.
I've read about using import to accomplish that. dont know how.

Anton Versteeg <an************@nnll.ibm.com> wrote in message news:<c7***********@sp15en20.hursley.ibm.com>...
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:

hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands

Nov 12 '05 #6
Apparantly you have established some link between the tables.
I assumed it was the physical sequence of the load/import files.
If that is not the case then you should probably consider using
'generated by default' in stead.
In that case the identity values can be part of the load/import file.

da****@libero.it wrote:
thank you Anton but I didn't understand:
once the root table has been loaded how is possible the leaf table
knows every row's correct id_root to be loaded?

I'dont think is possible use the load utility.
I've read about using import to accomplish that. dont know how.

Anton Versteeg <an************@nnll.ibm.com> wrote in message news:<c7***********@sp15en20.hursley.ibm.com>...
If you reset the identity in all the tables and if you are doing a load
with replace then you might end up with the same identity values
everywhere but only if there are no rejects.

da****@libero.it wrote:

hello,
please I would like to know if it's possible to load data in
hierarchical table structure with identity column used as pk (for all
the tables) :
I mean

table root (Id_root(pk,identity column generated always), att_r1,...)
table leaf (Id_leaf(pk,identity column generated always), id_root(fk
ref root), att_l1 ...)

could I use import to populate both root and leaf table avoiding an
insert select insert loop ?

many tanks in advance
best regard David


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands

Nov 12 '05 #7

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

Similar topics

7
by: Eric.Jones | last post by:
I've encountered a strange error with loading delimited files from a Samba (SMB) network drive, has anyone else seen this before? (Platform: WinXP Pro, UDB PE 8015, level 02060106, SAMPLE db) ...
2
by: Thames | last post by:
Hi, I have to repost my question for help. Yesterday I set up two DB UDB ESE V8.2 server on linux and windows platform, respectively. Both servers have been connected without any problems...
1
by: Rahul | last post by:
Hi Everybody I have some problem in my script. please help me. This is script file. I have one *.inq file. I want run this script in XML files. But this script errors shows . If u want i am...
3
by: cpressley2 | last post by:
Hi all, I am doing a db converison from windows v7 to aix v8. The db contains many LOBs. I did an export specifying the LOB option, compressed the data (using tar and gzip for windows) , ftp the...
5
by: Konstantin Andreev | last post by:
Recently I became interested, - Are the data, bulk loaded in the table with LOAD utility, consume the same disk space as loaded with IMPORT utility? The answer turned out to be NOT ! Here is a...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
7
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! I've tried LOAD .... INSERT INTO TABLE_NAME. The docs say about INSERT option: "One of four modes under which the load utility can execute. Adds the loaded data to the table without...
16
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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...
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.