Hi Folks,
I need help loading data using the sql loader
Sample Data:
Toledo,230-123456789,SABNJCKHQ,3250
Ottawa-arizona,240567890234,SABBMXCRN,2000
My control file looks as follows
LOAD DATA
TRUNCATE INTO TABLE TMP
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
field_1 CHAR "UPPERfield_1)",
field_2 CHAR "SUBSTRfield_2, 1, 3)",
field_3 CHAR "LTRIM(SUBSTRfield_2, 4), '-')",
field_4 CHAR "UPPER(TRIMfield_4))",
field_5 CHAR "UPPERfield_5)"
)
Output:
The first three fields are loaded properly, field_4 is skipped and field_5 is loaded. Using field_2 twice confuses the loader.
Can somebody please suggest a work around so all fields are loaded in their proper columns ?
Thanks in advance
rogers42
I need help loading data using the sql loader
Sample Data:
Toledo,230-123456789,SABNJCKHQ,3250
Ottawa-arizona,240567890234,SABBMXCRN,2000
My control file looks as follows
LOAD DATA
TRUNCATE INTO TABLE TMP
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
field_1 CHAR "UPPERfield_1)",
field_2 CHAR "SUBSTRfield_2, 1, 3)",
field_3 CHAR "LTRIM(SUBSTRfield_2, 4), '-')",
field_4 CHAR "UPPER(TRIMfield_4))",
field_5 CHAR "UPPERfield_5)"
)
Output:
The first three fields are loaded properly, field_4 is skipped and field_5 is loaded. Using field_2 twice confuses the loader.
Can somebody please suggest a work around so all fields are loaded in their proper columns ?
Thanks in advance
rogers42