oracle - Issue while checking data before loading in sql data loader -
i using following code excerpt while loading data in oracle db using sql loader:
"tran_code position(238:239)," + "frm_acct position(247:265) \"to_number(:frm_acct)\" nullif :frm_acct='*******************'," + "to_acct position(269:287)," +
it giving error on null if guess issue clear want insert null when data contains asterisk otherwise convert number , insert.
thanx in advance.
you can try -
"decode(:your_col,'***************',null,to_number(:your_col))"
however, suggest better option in scenarios "external table". here's link reference :- http://docs.oracle.com/cd/b19306_01/server.102/b14215/et_concepts.htm
Comments
Post a Comment