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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help - Setting a date field to NULL

Re: Help - Setting a date field to NULL

From: Jerome Grandjanny <grandjan_at_ldg.bruyeres.cea.fr>
Date: 1997/05/26
Message-ID: <33893BCD.6EC3@ldg.bruyeres.cea.fr>#1/1

Jason Trieu wrote:

> Has anyone done setting a date field to NULL? I'm writing embeded
> Oracle SQL trying to set a date field to NULL without any success.
>
> when I have:
>
> EXEC SQL update XX
> set XX_DATE = NULL
> where ...
>
> The pre-compiler complains of mismatch types. However, when I enter
> the statement manually under sqlplus, it workes fine.
>
>
> Jason T.

Hi Jason,

This is because your C-program probably includes a file containing #define NULL 0
so,

  set XX_DATE = NULL

is expanded to

  set XX_DATE = 0

during compilation phase.

Since Oracle in case insensitive, I suggest you write :

   set XX_DATE = null

HTH
Sincerely,
Jerome. Received on Mon May 26 1997 - 00:00:00 CDT

Original text of this message

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