-
Sqlloader Question
I have the following as a control file
load data
infile '/mydir/MY_TRANS_20050915.DAT'
into table MY_TRANS
when (1) <> "TR"
fields terminated by '|'
trailing nullcols
(
FWT_ACCT_NO,
FWT_VALUE_DT DATE "YYYYMMDD",
FWT_POST_DT DATE "YYYYMMDD",
FWT_CONV_TRAN_AMT,
FWT_CONV_CASH_AMT ,
)
The fwt_conv_cash_amt is coming in the file as empty. How do I tell sqlloader if it is empty put a zero in there?
-
-
If you look closely in the manual from slimdave's link, you may note that by using the DEFAULTIF clause, the field is set to 0 if the field in the datafile is a numeric field and this clause is satisfied.
Example:
FWT_CONV_CASH_AMT DECIMAL EXTERNAL DEFAULTIF FWT_CONV_CASH_AMT = BLANKS,
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|