Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> SQL*Loader Help -- Multiple rows into single column

SQL*Loader Help -- Multiple rows into single column

From: Bob Robert <mssql_2002_at_yahoo.com>
Date: Thu, 26 Jun 2003 12:52:34 -0700
Message-ID: <F001.005BAAE8.20030626123941@fatcity.com>


Gurus,

I have a special scenario to load data into tables with SQL*Loader.

My SQL Loader data is not fixed format. It changes from time to time. But there is a good pattern about the data. Data which starts with letter "R" should go to table1 and data which starts with letter "Z" should go to table2. Table1 data is always fixed format where as table2 is kind of tricky. I would like to load data which starts with letter "Z" into table2 as a single row.

For Example: (see my data at the bottom) Tom is having 3 lines of data
Bob and Sam is having 4 lines of data
Joe is having 5 lines of data

Right now as per my SQL Loader Control file (sql_load.ctl), all the data which starts with Z goes into different rows (Tom --> 3 rows, Bob and Sam --> 4 rows, Joe --> 5 rows).

I would like to load four rows into table1 (it is fine) and four rows into table2 (I am getting 16 rows).

I hope I explained properly.

FYI
Please take look at the following scripts.

create table table2
(shipment_no number(5),
 details varchar2(1000))
/
-- Create Tables Script End (sql_load.sql)

RBob 300
ZName: Bob
ZShip_To: Chicago
ZBill_To: Detroit
ZNotes: Best Customer Award

RSam 500
ZName: Sam
ZShip_To: Troy
ZBill_To: Dallas
ZNotes: Average Customer Award

RJoe 200
ZName: Joe
ZShip_To: Erie
ZBill_To: San Fransisco
ZNotes: Best Customer Award
ZSpecial Notes: Include Customer
-- SQL Loader Data File End (sql_load.txt)

Thanks,
Bob



Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Bob Robert
  INET: [EMAIL PROTECTED]
Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jun 26 2003 - 14:52:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US