If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > CONTINUEIF while Loading data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-25-10, 09:36
denisvenis denisvenis is offline
Registered User
 
Join Date: Dec 2008
Posts: 29
CONTINUEIF while Loading data

Hi,

What is mean by CONTINUEIF(72:72)='X' in Replacing one table in a multiple-table table space?

Ex :

LOAD DATA CONTINUEIF(72:72)='X'
REPLACE
INTO DSN8910.TOPTVAL
(col1,
col2)

This option removes data from the table space and replaces just the
data for the first table in multitable tablespace.

Thanks.
Reply With Quote
  #2 (permalink)  
Old 04-25-10, 13:24
Stealth_DBA Stealth_DBA is offline
Registered User
 
Join Date: May 2009
Posts: 472
denisvenis, CONTINUEIF indicates that you want to concatenate a row of data in the input file with the next row and treat it as 'one' row of data being loaded.

You can concatenate any number of rows up to a maximum size of 32,767.

The CONTINUEIF parameter has nothing to do with '...removes data from the table space and replaces just the data for the first table in multitable tablespace.'

Load Replace is what does this. One of the first things a Load Replace does is to remove all rows from a Table Space. Note that it is the Table Space and not just the Table that has all rows removed.

If you have two (or more) Tables in a Table Space and you run:

LOAD DATA REPLACE INTO TABLE1

LOAD DATA REPLACE INTO TABLE2

You would end up with only data in Table2. The First load removes all rows from the Table Space (both tables) and then add data to Table1. The Second load removes all rows from the Table Space (both tables although Table2 was already empty at this point) and then adds rows to Table2.

Just for completeness, if you want to remove all rows from both tables and then load both tables, you need to use Replace and Resume Yes.

LOAD DATA REPLACE INTO TABLE1

LOAD DATA RESUME YES INTO TABLE2.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On