Re: PROBLEM LOADING A STRING THAT DOESN'T CHANGE

From: Henk de Wilde <dewildeh_at_xs4all.nl>
Date: 1998/04/14
Message-ID: <3533011f.4613617_at_news.xs4all.nl>#1/1


On 13 Apr 1998 23:24:41 GMT, "Thomas Morgan" <tmorgan_at_mail.sdsu.edu> wrote:

>Hi, everyone:
>
> I am using SQLLOAD to fill a table from a file. Only some of the fields
>from the table are in the file, the rest are constant value fields, I think
>that may be I can do it as follows :
>
>LOAD DATA
>INFILE 'USR$DISK7:[ORAFAO.TOMAS.CURRENT]FAS_EOP_99.FAO'
>BADFILE 'USR$DISK7:[ORAFAO.TOMAS.PAIS_LOAD]FAS_EOP_99.bad'
>DISCARDFILE 'USR$DISK7:[ORAFAO.TOMAS.PAIS_LOAD]FAS_EOP_99.discard'
>REPLACE
>INTO TABLE STUDENTS_TESTER
>(
> SSN position(1:9),
> FAO_YEAR "1999",
> FAO_PERIOD "FALL",
> STATUS_CODE position(40:40),
>)
>

< SNIP Error description etc. >

If you are loading constant value's with Sql*Loader you should indicate this to Oracle with the keyword CONSTANT, else Oracle will interpret the quoted string as a "sql_string' and insert it (without the quotes) into the generated insert statement.

So your constant columns should be written :

    FAO_YEAR CONSTANT "1999",
    FAO_PERIOD CONSTANT "FALL", BTW are you sure about the quotes on FAO_YEAR? Oracle will mostly forgive you and convert automatically, PL/SQL will not.

HTH Henk de Wilde Received on Tue Apr 14 1998 - 00:00:00 CEST

Original text of this message