Re: SQL Loader default if null...
From: Michel Cadot <micadot_at_netcourrier.com>
Date: Mon, 11 Dec 2000 15:57:59 +0100
Message-ID: <912q35$brb$1_at_s1.read.news.oleane.net>
myfield POSITION (043:057))
INTO TABLE mytable
myfield CONSTANT 'default value')
Date: Mon, 11 Dec 2000 15:57:59 +0100
Message-ID: <912q35$brb$1_at_s1.read.news.oleane.net>
You can do something like:
LOAD DATA
INFILE 'mydata.dat'
REPLACE
[Quoted] INTO TABLE mytable
WHEN myfield != ' ' (field1 POSITION (001:007), field2 POSITION (011:030),
myfield POSITION (043:057))
INTO TABLE mytable
WHEN (043:057) = ' ' (field1 POSITION (001:007), field2 POSITION (011:030),
myfield CONSTANT 'default value')
-- Have a nice day Michel Colin Basterfield <colinb_at_areagem.demon.co.uk> a écrit dans le message : 976540349.10155.0.nnrp-14.c1ed1510_at_news.demon.co.uk...Received on Mon Dec 11 2000 - 15:57:59 CET
> Hi there,
>
> Is it possible to put some conditional code into the control file to
> force the insertion of a default value into the table if the field is
> null????
>
> Many thanks
> Colin B
>
>