Home » RDBMS Server » Server Utilities » SQL Loader Issue
SQL Loader Issue [message #245911] Tue, 19 June 2007 04:12 Go to next message
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 #245917 is a reply to message #245911] Tue, 19 June 2007 05:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Copy and paste your control file.
Copy and paste your log.
Copy and paste a description of the table.
Copy and paste an example of your data (failed and successful).
So we can reproduce and find.

Don't forget to format: How to format your posts

Regards
Michel
Re: SQL Loader Issue [message #245938 is a reply to message #245911] Tue, 19 June 2007 06:45 Go to previous message
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
Previous Topic: SQL Loader not starting from Solaris
Next Topic: Unable to export Table having CLOB data type
Goto Forum:
  


Current Time: Mon Jul 01 10:41:01 CDT 2024