Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old March 17th, 2004, 02:45 PM
jabs jabs is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 19 jabs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 26 sec
Reputation Power: 0
SQL*LDR prob

I hope someone can help me with this (or point me to some documentation for it).

I'm using sql*ldr to load a flat file. The char data in the file is enclosed by quotes (") - I take care of those with the 'optionally enclosed by' syntax. Unfortunately, some of these data within the narrative fields also contain quotes. For example, a file might look like this:

0990|"column1"|"A great forum is called "DEV SHED". It really works!"|03/17/2004|.......

This record would reject because of the quotes within the text. Any ideas? Thanks.

Last edited by jabs : March 17th, 2004 at 03:24 PM.

Reply With Quote
  #2  
Old March 18th, 2004, 01:23 AM
oracleforum oracleforum is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 oracleforum User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sqlloader

Kindly use the following control file script to load the required data

Load data
infile *
truncate
into table testraj
fields terminated by "|"
optionally enclosed by "'"
(sno , coln1, remark "replace(:remark,'\"','')")
BEGINDATA
0990|"column1"|"A great forum is called "DEV SHED". It really works!"

It is assumed that the data is separated by '|' symbol. again this script will remove the " symbol within data for example "DEV SHED" will be as DEV SHED. so if " symbol has to be retained you can write a separate script (function) and use in place of replace.
hope this will be helpful to you.
regards
raj

Reply With Quote
  #3  
Old May 7th, 2004, 01:20 PM
jabs jabs is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 19 jabs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 51 m 26 sec
Reputation Power: 0
Thanks Raj

I thought I already wrote to say thanks - but I guess not. So....Thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > SQL*LDR prob


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway