Home » RDBMS Server » Server Utilities » sql loader and line feed
sql loader and line feed [message #129808] Tue, 26 July 2005 15:07 Go to next message
yjin
Messages: 8
Registered: July 2005
Junior Member
I have a flat file to import into oracle database by sql*loader. In this file, there are two fields which contain line feed character. I added str x'7c' into my control file. But everytime I tried import it only imports the first record. Those two fields containing line feed character are last two fields in the file.

Any suggestion would be appreciated.
Re: sql loader and line feed [message #129809 is a reply to message #129808] Tue, 26 July 2005 15:08 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
post oracle version,ddl of table, control file and some sample data
Re: sql loader and line feed [message #129810 is a reply to message #129809] Tue, 26 July 2005 15:13 Go to previous messageGo to next message
yjin
Messages: 8
Registered: July 2005
Junior Member
The Oracle version is 10g.
  • Attachment: rights.txt
    (Size: 4.47KB, Downloaded 1522 times)
Re: sql loader and line feed [message #129811 is a reply to message #129810] Tue, 26 July 2005 15:16 Go to previous messageGo to next message
yjin
Messages: 8
Registered: July 2005
Junior Member
The control file is attached.

The destinated fields type and length are matching with those in control file.

Thanks.
  • Attachment: rights.ctl
    (Size: 0.53KB, Downloaded 1686 times)
Re: sql loader and line feed [message #129982 is a reply to message #129811] Wed, 27 July 2005 09:53 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
I can't make it work.
May be i am missing something very basic.
I was able to load all lines, but the column values are whacked ( data in wrong columns, becuase of positions).
I guess the other alternative is to fix the datafile to our need before loading ( by somekind of scripting) or to load into a staging table in as-is condition and apply sql methods to get data or to use external tables.
I am still looking into it and will keep posted.


Re: sql loader and line feed [message #129988 is a reply to message #129982] Wed, 27 July 2005 10:17 Go to previous messageGo to next message
yjin
Messages: 8
Registered: July 2005
Junior Member
Thanks for your work. I figured it out just 5 minutes ago. I changed the flat file format to delimited. And changed the control file to match the delimited format. And it works fine.

Thanks to this site. I got a lot of good ideas from here.
Re: sql loader and line feed [message #133965 is a reply to message #129988] Mon, 22 August 2005 23:30 Go to previous message
neeta_1185
Messages: 8
Registered: August 2005
Location: bangalore
Junior Member
i'm facing the same issue as line feed is getting appended in my table column. Can you please tel me how you made your flat file to be delimited so as to get the proper formatting.
Previous Topic: Particular Coulmns loading
Next Topic: Import Problem
Goto Forum:
  


Current Time: Thu Jul 04 05:29:38 CDT 2024