Re: Sql * Loader

From: Robert Klemme <bob.news_at_gmx.net>
Date: Tue, 18 Apr 2006 12:32:11 +0200
Message-ID: <4ajthcFthpd1U1_at_individual.net>


dmolinier_at_gmail.com wrote:
> In fact, no... but you can do it nevertheless.
>
> Assuming your Oracle version is > 8i, there is a new keyword "FILLER"
> than you can use to reach your need : use '*' (single star) as a
> separator, and modify your control file so that 5 fields will be loader
> from your data file.
>
> [...]
> name CHAR TERMINATED BY "*" ...,
> dummy1 FILLER CHAR EXTERNAL TERMINATED BY "*" ...,
> town CHAR TERMINATED BY "*" ...,
> dummy2 FILLER CHAR EXTERNAL TERMINATED BY "*" ...,
> country CHAR TERMINATED BY "*" ...,
> [...]
>
> Obviously, the "dummy" fields are not needed in the destination table.
>
> Hope this helps...

Alternatives

  • change the piece of code that generates the file
  • feed the file through sed, perl, ruby, awk or whatever to replace "**" by a single char

Kind regards

        robert Received on Tue Apr 18 2006 - 12:32:11 CEST

Original text of this message