Home » RDBMS Server » Server Utilities » sqlldr and default values - Can this be done???
|
|
Re: sqlldr and default values - Can this be done??? [message #71993 is a reply to message #70866] |
Mon, 17 February 2003 10:45 |
Waibale C.S Simon
Messages: 1 Registered: February 2003
|
Junior Member |
|
|
Hi all-
I'm trying something similar using sqlldr with decode.
------Control file------
load data
infile 'c:pmsassets4.csv'
DISCARDFILE 'assets4.dsc'
Truncate
into table mfi_inputs_load
fields terminated by ',' optionally enclosed by '"' TRAILING NULLCOLS
(
ASH_CODE "decode(:ASH_CODE,
B1,AD1101,
B2,AD1102,
AD1101)",
FILLER01 FILLER,
VALUE "to_number(:VALUE,'99999999D99')",
YEAR_CODE "nvl(:YEAR_CODE,'2002')",
QUARTER_CODE "nvl(:QUARTER_CODE,'Q4')",
WEF_DATE SYSDATE,
MFI_CODE "nvl(:MFI_CODE,'MFI_077')"
)
---------'c:pmsassets4.csv'---------
B1, Cash ,"675,685",,,,
B2, Deposits in financial institutions ,"1,170,796",,,,
---------Excerpt of 'c:pmsassets4.out'-------
Record 1: Rejected - Error on table MFI_INPUTS_LOAD, column ASH_CODE.
ORA-00984: column not allowed here
Record 2: Rejected - Error on table MFI_INPUTS_LOAD, column ASH_CODE.
ORA-00984: column not allowed here
|
|
|
Goto Forum:
Current Time: Mon Oct 07 03:45:14 CDT 2024
|