Solved

SQL lOADER(DATA FORMAT)

Posted on 2006-10-30
6
738 Views
Last Modified: 2008-03-17
Hi All,
My data file records looks like this
95938,95940,12-23-2005,01-26-2006,"Landmark VI CDO, Ltd.",Asset-Backed Securities,CDO,,,,310,6,B,15000000,,9.2,Aa2,AA,,Floating,,100.000,,50.000,,Libor,,Other Tranche Comments,Comments

How can I load this file using sql loader
I created the ctl file like this

load data
badfile /u01/sf_laod.bad'
append
INTO TABLE TT
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(IGMSecurityID  "trim(:IGMSecurityID)",
-----
-----)

It ingnore all the records
saying  ORA-01008: not all variables bound

I think it is due to  (")  data  have in ,"Landmark VI CDO, Ltd." How can I solve this problem.
Reply ASAP
Thanks



0
Comment
Question by:avi_ny
6 Comments
 
LVL 34

Accepted Solution

by:
johnsone earned 500 total points
ID: 17834584
I have found issues with the optionally enclosed by part of SQL*Loader.  In my experience if there are multiple delimiters, it treats it as 1 column.

For example:

1,,2

is treated as

1,2

I would load the data into a temporary table without the optionally enclosed by, the strip off "s with a command like:

update <tab>
set <col> = replace(<col>, '"')
;
0
 
LVL 28

Expert Comment

by:Naveen Kumar
ID: 17835964
can u post your full .ctl file because i can try it it my system here.

Thanks
0
 
LVL 29

Expert Comment

by:MikeOM_DBA
ID: 17836332

@johnsone
>>...if there are multiple delimiters, it treats it as 1 column.

Never have I seen SQL*Loader treat consecutive delimiters as ONE.

0
 
LVL 34

Expert Comment

by:johnsone
ID: 17836394
Only with the optionally enclosed by.  That is the ONLY time I have ever seen that.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20296175
Forced accept.

Computer101
EE Admin
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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
oracle 10G 5 48
Remove Hyphens in Oracle SQL 5 45
Pl/SQL Query 31 62
Oracle Next Available Number 2 19
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now