Re: SQL*LOADER Default value problem
Date: 1998/04/01
Message-ID: <3522c8a0.2550344_at_news.ipf.net>#1/1
On Wed, 01 Apr 1998 11:30:51 -0500, Royce Franklin Medlock <medlocrf_at_dunx1.ocs.drexel.edu> wrote:
>The table that I am trying to load my data into has a composite Primary
>Key of 4 columns (id, year_term, crs_id, crs_section). The data file is
>fixed-width and about 1% of the records have blanks where the value for
>crs_section would be. I have been trying to figure out a way to get a
>default value into the crs_section column if it is blank in my data
>file.
>
>I tried putting a default value on the table structure, but this doesn't
>work through SQL*LOADER. I tried using a WHEN clause and CONSTANT in my
>sqlloader control file, but CONSTANT doesn't seem to work with POSITION
>(my data file being fixed-width).
>
Hi,
Try an :nvl(crs_section, 'your_default_value_goes_here') expression in your field definition in the loader control file, this should do the job.
HTH
Peter
-- Peter Schneider peter.schneider_at_okay.netReceived on Wed Apr 01 1998 - 00:00:00 CEST