Re: SQL Loader default if null...

From: Colin Basterfield <colinb_at_areagem.demon.co.uk>
Date: Mon, 11 Dec 2000 15:25:42 -0000
Message-ID: <976548320.13509.0.nnrp-14.c1ed1510_at_news.demon.co.uk>


Many thanks for that Michael

Regards
Colin B

"Michel Cadot" <micadot_at_netcourrier.com> wrote in message news:912q35$brb$1_at_s1.read.news.oleane.net...
> You can do something like:
>
> LOAD DATA
> INFILE 'mydata.dat'
> REPLACE
> 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...
> > 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
> >
> >
>
>
Received on Mon Dec 11 2000 - 16:25:42 CET

Original text of this message