Home » SQL & PL/SQL » SQL & PL/SQL » SQLLDR : Remove ^M (Oracle 10g , AIX 5,3)
SQLLDR : Remove ^M [message #325141] Thu, 05 June 2008 02:18 Go to next message
ednms
Messages: 39
Registered: November 2007
Member
Hi all;

I'm having problem to remove ^M from the input file using sql loader.

I use rtrim to remove the ^M at the end of each line as it works in oracle but failed when executing in sql loader. This is part of my .ctl file:

TTL_FOREIGN_AMT CHAR TERMINATED BY ',' "rtrim(:TTL_FOREIGN_AMT,'^M')"


Any suggestions?..many thanks

Re: SQLLDR : Remove ^M [message #325151 is a reply to message #325141] Thu, 05 June 2008 02:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
^M=chr(13)

Regards
Michel
Re: SQLLDR : Remove ^M [message #325155 is a reply to message #325151] Thu, 05 June 2008 03:11 Go to previous messageGo to next message
ednms
Messages: 39
Registered: November 2007
Member
Sorry i didnt get u, can u explain?

Many thanks
Re: SQLLDR : Remove ^M [message #325166 is a reply to message #325155] Thu, 05 June 2008 04:02 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Try:
TTL_FOREIGN_AMT CHAR TERMINATED BY ',' "rtrim(:TTL_FOREIGN_AMT,chr(13))"
Re: SQLLDR : Remove ^M [message #325167 is a reply to message #325155] Thu, 05 June 2008 04:02 Go to previous message
ednms
Messages: 39
Registered: November 2007
Member
Michel;

Thanks i know now what u mean, u mean replace the ^M with the chr(13)

It works! thank u so much, really appreciate it.
Previous Topic: what is the Best Index for a column which can be a null
Next Topic: Dependent procedures on a table
Goto Forum:
  


Current Time: Sat Dec 03 16:31:48 CST 2016

Total time taken to generate the page: 0.09260 seconds