Can External Tables Contain a WHEN Clause [message #10960] |
Wed, 25 February 2004 11:58 |
Mike
Messages: 417 Registered: September 1998
|
Senior Member |
|
|
I need to eliminate a transaction type from an external table definition. The Transaction type is in column 1 of the flat file and 1 record type does not conform to the others. Is it possible to include a WHEN clause or something like the following:
WHEN tran_type = '2'
for this sample what would the syntax and placing of the clause be:
CREATE TABLE x_temp
(tran_type CHAR(1),
state CHAR(4),
negative_ind CHAR(1)
)
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY x_input
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
BADFILE bad_dir:'xbad.bad'
LOGFILE log_dir:'xlog.log'
FIELDS
(tran_type POSITION(1:1) CHAR(1),
state POSITION(2:5) CHAR(4),
negative_ind POSITION(137:137) CHAR(1)
)
)
LOCATION ('xinput.txt')
)
REJECT LIMIT UNLIMITED;
|
|
|
|
|