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 -> Re: SQL*Load delimited fields

Re: SQL*Load delimited fields

From: Gunjeet Singh <gunjeet_at_sunsparkle.corp.sun.com>
Date: 26 Aug 1998 22:31:26 GMT
Message-ID: <6s22bu$73p$1@corpnews1.Corp.Sun.COM>


Hi,

I have selectively loaded parts of a data file using column positions. Here's an example (my data file didn't have any special delimiters):

LOAD DATA

        REPLACE
        INTO TABLE xyz
        (
                T_NUM                 POSITION (1:20) CHAR,
                T_TYPE                POSITION (21:21) CHAR,
                T_BEFORE_TAX_AMOUNT   POSITION (22:35) CHAR,
                T_TAX_AMOUNT          POSITION (37:50) CHAR,
                T_AMOUNT              POSITION (52:65) CHAR,
                T_CREATION_DATE       POSITION (67:76) DATE "DD/MM/YYYY",
                T_DUE_DATE            POSITION (78:87) DATE "DD/MM/YYYY",
                T_MODE                POSITION (89:97) CHAR
	)

You can simply leave out those column positions that you want to filter out.

In article 1_at_nnrp1.dejanews.com, eweber_at_bdo.com writes:
> I am trying to use SQL*LOAD to load a file of delimited data, but I do not
> want every field to be loaded into the database. For example my input data
> looks like this:
>
> cat,dog,banana,elephant,monkey,bone,peanuts
>
> But I only want to load "monkey" and "banana" into my table of two columns.
>
> I can't seem to find the syntax to do this. Is it possible? Or do I have to
> right some type of parser to eliminate the unwanted fields before I attempt
> the SQL*LOAD?
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Wed Aug 26 1998 - 17:31:26 CDT

Original text of this message

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