Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help - Setting a date field to NULL
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
![]() |
![]() |