Re: SQL*Loader POSITION clause question
From: Francois G. Gendron <gendron_at_cam.org>
Date: Thu, 14 Jul 1994 10:34:21 -0500
Message-ID: <gendron-140794103421_at_gendron.hip.cam.org>
Date: Thu, 14 Jul 1994 10:34:21 -0500
Message-ID: <gendron-140794103421_at_gendron.hip.cam.org>
In article <CsuEHx.385_at_wtc35a.DaytonOH.NCR.COM>, Tim Wendt <tim.wendt_at_daytonoh.ncr.com> wrote:
> I have a simple question about SQL*Loader. We are in the process of converting
> to Oracle and I'm working on interfaces to our legacy systems. What I'm
> wondering is can I concatenate data from two or more positions within my INFILE
> record and load them into a single column? Example:
>
> My INFILE record looks like this:
>
> XX1234-56-78XXXX
>
[...Deleted]
I don't think that you can add position ranges to build your destination column, but what you can do is load the full position range and use string functions to build what you want.
Example:
INTO TABLE MyTable
(mycolumn position(3:12) "substr(:mycolumn,1,4)||substr(:mycolumn,8,2) || substr(:mycolumn,11,2)")
I hope my syntax is right, but this should do it.
-- Francois G. Gendron Internet : gendron_at_cam.org Conseiller Principal Telephone: (514) 651-8471 Champagne, Parent & Associes Inc. Montreal, Quebec -- Efficient, Re-engineered Businesses supported by Oracle Applications --Received on Thu Jul 14 1994 - 17:34:21 CEST