Hi, I'm brand new to Oracle and am very much learning the ropes, so please go easy on me.
We're currently loading a table from a csv using a control file like this:
However, the first field PARTITION_KEY won't be available in the csv file that we're using to load the table. Is it possible to hard code the PARTITION_KEY value into the control file for the load. Something like this maybe:
In the above example "xxx" is my PARTITION_KEY.
Thanks,
Smithy.....
We're currently loading a table from a csv using a control file like this:
Code:
OPTIONS (SILENT=(HEADER, FEEDBACK), DIRECT=FALSE, SKIP=1)
LOAD DATA
CHARACTERSET US7ASCII
INFILE 'TEST.CSV'
TRUNCATE
INTO TABLE TEST
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
PARTITION_KEY "TO_CHAR(UNISTR(:PARTITION_KEY))"
,A "TO_NUMBER(:A)"
,B CHAR(5) "TO_CHAR(UNISTR(:B))"
,C "TO_NUMBER(:C)"
)
However, the first field PARTITION_KEY won't be available in the csv file that we're using to load the table. Is it possible to hard code the PARTITION_KEY value into the control file for the load. Something like this maybe:
Code:
OPTIONS (SILENT=(HEADER, FEEDBACK), DIRECT=FALSE, SKIP=1)
LOAD DATA
CHARACTERSET US7ASCII
INFILE 'TEST.CSV'
TRUNCATE
INTO TABLE TEST
FIELDS TERMINATED BY ','
TRAILING NULLCOLS
(
"xxx" "TO_CHAR(UNISTR(:PARTITION_KEY))"
,A "TO_NUMBER(:A)"
,B CHAR(5) "TO_CHAR(UNISTR(:B))"
,C "TO_NUMBER(:C)"
)
In the above example "xxx" is my PARTITION_KEY.
Thanks,
Smithy.....