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:
  #1  
Old February 23rd, 2005, 01:25 AM
suresh1977 suresh1977 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 13 suresh1977 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 16 m 57 sec
Reputation Power: 0
Unhappy Sqlloader

Hi,

I Am using sql Loader to load text file in oracle, but the problem is for one record there are two lines of entry in the text file
for eg 0500aabbbabahdhdhdh
0501gdaioajioaojojo are two entries of one single record in the text file.

Now in oracle database i want to insert this record in a single record in two columns one for 0500 line and other for 0501 line. How do i do this? Since for this to happen i would have to run the loader based on the condition. I have written the following code :::
load data
infile 'OUTGOING.TXT'
into table CB_TEST
truncate
WHEN BTHHEADER='0500'
(
seq sequence(1),
BTHHEADER Position(01:04),
FILEDATA position(01:170))
INTO table CB_TEST
Append
WHEN BTHHEADER='0501'
(seq1 sequence(1),
BTHHEADER Position(01:04),
BTHFOOTER Position(01:04),
FOOTERDATA position(01:170)
)
But what is does is, it appends first few lines of 0500 column but leaves the 0501 column blank, then loads few lines for 0501 cols leaving 0500 column blank. How can I get them in a single line.....
Any advice is welcome.

Thanks In advance,
Suresh

Last edited by suresh1977 : February 23rd, 2005 at 01:27 AM. Reason: Spelling and Grammer Mistakes

Reply With Quote
  #2  
Old February 24th, 2005, 09:29 AM
wubandit99 wubandit99 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 30 wubandit99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 6 m 31 sec
Reputation Power: 4
Look into the sqlldr commands CONCATENATE and CONTINUEIF... That is what is used for combining multiple physical rows into 1 logical row.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Sqlloader


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
Stay green...Green IT