Here is my DDL script:
CREATE TABLE STG_CAR_PRODUCT_PRICE_T
(
PRODUCT_ID VARCHAR2(10 BYTE),
ITEM_PRICE1 NUMBER(8,2),
ITEM_PRICE1 NUMBER(8,2),
ITEM_MTH_YEAR VARCHAR2(6 BYTE)
)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY Products
ACCESS PARAMETERS
( RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ' ' OPTIONALLY ENCLOSED BY '"'
MISSING FIELD VALUES ARE NULL
)
LOCATION ('PRODUCT_FILE.dat')
)
REJECT LIMIT UNLIMITED
NOLOGGING
NOCACHE
NOPARALLEL;
I would like that when the column ITEM_MTH_YEAR is null, instead of
containing nothing, it would have a value of '000000'
Thank you,
Ccote
>I would like that when the column ITEM_MTH_YEAR is null, instead of
>containing nothing, it would have a value of '000000'
You know where to find the documentation?
--
Sybrand Bakker, Senior Oracle DBA
I have a little experience with this. It stems from the fact that I
had used SQL Loader to emulate such behavior before (i.e. using Oracle
functions on columns to change their "in-file" values).
It seems there isn't an easy way to do this with External Tables,
because Oracle is counting on you doing the transformation with SQL in
an INSERT statement into the "real" destination table.
The only thing I can think of would be for you to insulate your
external table with a view which does the "NVL" function for you.
Otherwise - you will have to do an INSERT from the external table into
a "real" Oracle table...
Hope this helps...
Sincerely,
Philip