Re: Using SQL*Loader
Date: 1996/06/18
Message-ID: <4q61et$p0n_at_news.dot.gov>#1/1
You should be able to do something like:
field1 POSITION(1:4) INTEGER EXTERNAL "DECODE(field1,'SLSM',1,'TERR',2,...)
check out 'Applying SQL operators to fields' section of your manual.
Hope this helps,
rick
Carol Kilner (kilnerc_at_basf-corp.com) wrote:
: I'm trying to do the following using SQL*Loader. Can it be done.
: If have the following input file
: SLSMNO1 Salesman Name # 1
: SLSMN02 Salesman Name # 2
: INDGRP1 Industry Group # 1
: INDGRP2 Industry Group # 2
: TERR1 Territory desc # 1
: TERR2 Territory desc # 2
: ...you get the idea.
: If positions (1:6) = "SLSMNO" I want to insert those records
: into say table # 1. The catch is I want to insert 2 fields one
: with the code 1 and the other with the description. I don't want to
: actually insert SLSMNO in any field -- as is the example in the oracle
: manual.
: Similary, if positions (1:5) = "TERR"
: I would appreciate any ideas on this one. One solution I have come up with is an intermediate table and
: then use SQL to load the final table...no exactly a neat solution.
: Thanks,
: Carol Kilner
: BASF Canada
Received on Tue Jun 18 1996 - 00:00:00 CEST