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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL Loader - How to load userid without hardcoding

Re: SQL Loader - How to load userid without hardcoding

From: CHANCL <CHANCL_at_AM.NIE.AC.SG>
Date: Thu, 29 Feb 1996 09:08:00 +0800
Message-Id: <9602290732.AA16326@alice.jcc.com>


Hi Tony & Tim !

Thanks 4 your replies regarding the above qn.

Solution fr Tony :
>> LOAD DATA INTO TABLE TABLE1
>> ( USERID "USER",
>> TABLECOUNTER SEQUENCE(MAX,1),
>> FIELD1 POSITION(01:12) CHAR)
It works. HURRAY ! :-)

However, even empty lines from the data file will be loaded.

Eg.

LINE 1 => 123456789012
LINE 2 =>
LINE 3 => End Of File

In the table, there will be 2 rows =>

USERNAME , 1, 123456789012
USERNAME , 2, Does anyone have a way to prevent empty rows from loading into table ?

TIA ChorLing
chancl_at_nievax.nie.ac.sg

PS: More details

My table Table1 contains field :

1) userid varchar2(30)
2) Tablecounter number(4)
2) Field1 varchar2(12)

My data file contains only Field1 data from 1 to 12 position eg 123456789012
222222222222

My ctrl file,
LOAD DATA INTO TABLE TABLE1
( USERID "USER",
 TABLECOUNTER SEQUENCE(MAX,1),
 FIELD1 POSITION(01:12) CHAR) Received on Thu Feb 29 1996 - 02:33:03 CST

Original text of this message

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