HELP:8.04 SQL*Loader loading dated data into partitions

From: <HugeBlackHole_at_hotmail.com>
Date: Tue, 02 Mar 1999 12:20:34 GMT
Message-ID: <36dfd727.101344655_at_proxy.bcti.bctel.com>



Hi,

I have the following table and partitions created:

table: usage

Sample ASCII file for import (no-header)

session_date OWNER DURATION
199901021030|peter|3:00
...

199902021030|paul|1:00
...

199903032030|mary|4:00
...

Partitions:	usage(199901)	- session_date less than 19990201
		usage(199902)	- session_date less than 19990301
		usage(199903)	- session_date less than 19990401

I wish to build the SQL*LOADER control file to feed the data into the corresponding partitions.

I attempted to use the WHEN clause in the SQL*LOADER and it seems to me that the WHEN clause only supports = or !=. It doesn't do LESS THAN. Here is my control file:
8<----------
LOAD DATA
INFILE *
APPEND
INTO TABLE usage PARTITION(199901)
WHEN session_date < '19990201000000'
FIELDS TERMINATED BY '|'
(...
 ...
}
INTO TABLE usage PARTITION(199902)
WHEN session_date < '19990301000000'
FIELDS TERMINATED BY '|'
(...
 ...
}
INTO TABLE usage PARTITION(199903)
WHEN session_date < '19990401000000'
FIELDS TERMINATED BY '|'
(...
 ...
}
BEGINDATA
...
...

8<----------

The above file doesn work since the WHEN doesn't like < or >. Does anyone know how to address the problem? Or does SQL*Loader figure out the partitions by itself?

Thank you very much in advance.

Ken
kschiu_at_bc.sympatico###.ca

Please remove the ### if you want to email me. Received on Tue Mar 02 1999 - 13:20:34 CET

Original text of this message