SQL Loader Issue [message #245911] |
Tue, 19 June 2007 04:12 |
galaxy
Messages: 62 Registered: October 2005
|
Member |
|
|
Hi,
I am not sure if I am in the right forum.
I have an issue with uploading flat files in the database.
I have written the ctl file but it is not working.
This line contains the issue:
--xxx position(166:181) DECIMAL EXTERNAL "replace(decode(substr(trim(:xxx),1,1),'?',0,:xxx),',','.')",
So the decode function checks if there is a ? Sign on this position in the file. If yes it replaces this with a 0. The replace function is needed because the decimal numbers in the file use , for decimal numbers and the database uses .
But both functions togehter do not work?
Can somebody help me?
Thanks
|
|
|
|
Re: SQL Loader Issue [message #245938 is a reply to message #245911] |
Tue, 19 June 2007 06:45 |
galaxy
Messages: 62 Registered: October 2005
|
Member |
|
|
Hi,
I think I found the solution. If I enter it like this:
--xxx position(166:181) DECIMAL EXTERNAL "decode(substr(trim(:xxx),1,1),'?',0,replace(:xxx,',','.'))",
So the replace is on an other position. It works fine.
Thanks for you help
|
|
|