Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQLLDR Question

Re: SQLLDR Question

From: <sumanm_at_my-deja.com>
Date: Fri, 17 Sep 1999 23:31:06 GMT
Message-ID: <7ruivr$2em$1@nnrp1.deja.com>

If it is a comma delimited file, then you can write
a statement in the Control file, like
colname "decode(colname, '0000', null, ' ', null)",

Otherwise, you can write a before Insert trigger (for each row) on the table that will convert the zeros and spaces to null.
if :new.colname = '0000' then

    :new.colname := null;
end if;

if :new.colname = ' ' then

    :new.colname := null;
end if;

Hope that helps.



Suman Mehta

In article <7rtkcv$b1o$1_at_nnrp1.deja.com>,   amerar_at_ci.chi.il.us wrote:
>
>
> Hello,
>
> I know that you can have conditions within your SQLLDR control file on
> fields, such as NULLIF........
>
> How can I put 2 conditions? Say I want the field NULL if is equal to
> space or all zeroes......I cannot seem to figure out how to do
this....
>
> Any help would be appreciated......please send a copy of your response
> to my e-mail.
>
> Thanks,
>
> Arthur
> amerar_at_ci.chi.il.us
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Sep 17 1999 - 18:31:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US