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

Home -> Community -> Usenet -> c.d.o.misc -> Newbie sqlload question

Newbie sqlload question

From: Atif Ahmad Khan <aak2_at_Ra.MsState.Edu>
Date: 1996/11/13
Message-ID: <aak2.847895527@Isis.MsState.Edu>#1/1

I have a test table with one row in it that has 2 columns.

Part_number	varchar (12) primary key;
Price 		real        ;

Part_number 	Price
-----------     -----
123456          100

imported from a text file catalog.txt:
123456 ,100

using control file :
LOAD
INFILE 'catalog.txt'
INTO TABLE catalog_db
FIELDS TERMINATED BY ','

(       Part_Number, 
        Price char terminated by whitespace )

Now when I do :

select * from catalog_db where part_number='123456';

It returns nothing. Apparently it loaded all he whitespaces also and considers that part of the number and therefore says that '123456' <> '123456 '

My question is how can I tell sqlload to ignore trailing whitespaces ? I cannot give it a fixed position (from/until) for this field as the part number could be fewer or more characters han 6.

Thanks very much. Any help will be greatly appreciated.

Atif Khan
aak2_at_ra.msstate.edu Received on Wed Nov 13 1996 - 00:00:00 CST

Original text of this message

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