SQL*LOADER Default value problem

From: Royce Franklin Medlock <medlocrf_at_dunx1.ocs.drexel.edu>
Date: 1998/04/01
Message-ID: <35226BBB.10A7EE82_at_dunx1.ocs.drexel.edu>#1/1


[Quoted] 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).

Any suggestions would be appreciated. Unfortunately I can't change my data file because it is also being used to load into a Sybase DB.

--
R. Franklin Medlock, Jr.
Asst Dir of Planning, Research, and Technology
Office of Student Information and Records
Drexel University

Phone: (215) 895-1495      Fax: (215) 895-1692

medlocrf_at_duvm.ocs.drexel.edu, http://www.osir.drexel.edu
Received on Wed Apr 01 1998 - 00:00:00 CEST

Original text of this message