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

Home -> Community -> Usenet -> comp.databases.oracle -> Sqlloader: All database in one single plain text file

Sqlloader: All database in one single plain text file

From: BadMan! <loktai_at_engineer.com>
Date: 25 Feb 2004 10:04:21 -0800
Message-ID: <8e5d4aee.0402251004.5fbc6c7f@posting.google.com>

Hi all,

I'm trying to use sqlloader to import a database with multiple different tables which has been exported to one single plain text file. No fixed lenght. Let's say database.txt is something like

fruits,orange,orange
fruits,banana,yellow
fruits,pear,green

users,John Doe,25,34,26th upper street,0, 12-2-2003 users,Fred Flinstone, 24,5,14th Downing Lane,1,1-7-2002

żIs it possible to try an approach based on WHEN statements? I mean:

LOAD DATA
INFILE database.txt
FIELDS TERMINATED BY ','
WHEN (first field is 'fruits')
(name, color)

WHEN (first field is 'users')
(name, age, visits, address, active, since)

I only whant to know if it is possible or not, but will wellcome advice in ctl file sintax.

Thanks in advance and best regards Received on Wed Feb 25 2004 - 12:04:21 CST

Original text of this message

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