|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
Look into the sqlldr commands CONCATENATE and CONTINUEIF... That is what is used for combining multiple physical rows into 1 logical row.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Sqlloader |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|