Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to load data with escaped characters in SQL*Loader

Posted on 2001-08-31
7
828 Views
Last Modified: 2012-06-27
I want to load data dumped by Informix unload command. If the field delimiter or a newline is found in values, Informix unload will use escape '\'. How do I load it to Oracle? Does SQL*Loader recognize escaped characters? What other tools may I use?

For example, the following data should be one record in Oracle. Thanks.

1|this is a test\
 with newline in values
0
Comment
Question by:hakula
  • 3
  • 3
7 Comments
 
LVL 3

Expert Comment

by:jkstill
ID: 6446140
I believe best choice is to clean up the data before loading it into Oracle.

A small Perl script is the perfect method for doing this.  Trying to load
this directly through SQL*Loader may not be possible.


0
 
LVL 3

Expert Comment

by:Wadhwa
ID: 6446168
Hi hakula
Is the record delimiter is also the new line char

Sam..
0
 
LVL 1

Author Comment

by:hakula
ID: 6446683
Hi Sam,

In the example, the delimiter is '|'. The newline is in the middle of data for the second column.

Thanks.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 3

Expert Comment

by:Wadhwa
ID: 6446879
Hi hakula,

I am asking not the field delimiter , i am asking about record delimiter

Waht is the delimeter between one record and the second record.

Sam..
0
 
LVL 1

Author Comment

by:hakula
ID: 6447598
Sam,

yes, record delimiter is newline.
Thanks.
0
 
LVL 3

Accepted Solution

by:
Wadhwa earned 50 total points
ID: 6447723
Hi hakula,
since The newline is in the middle of data for the second column and record delimiter is also the new line char , in this case it is not possible to load data  directly through sql*loader. You have make changes in the text  file to change the record delimiter  to some other char other then  "|" or "new line char".

Here you may find  some tool to load the data, you may try it. http://www.benthicsoftware.com/products.html
The name of the tool is GOLDLOAD


Goodluck
Sam
0
 
LVL 1

Author Comment

by:hakula
ID: 6449456
Sam,

Thanks for your idea. Changing the record delimiter is the key to the problem, but your comment failed to mention how to change it. I figured out how to change the record delimiter myself.

Thanks again.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question