On Wednesday 26 October 2005 15:06, Nicolas Dufour wrote:
> Hi
>
> I m trying to do a pretty simple insert :
>
> insert into foo (fields ........) select value1, value2,  ....,  field3,
> field5 from foo where id = x
>
> Everything work until when a value is equal to NULL, i have this message :
> error: Encountered "null" at line ....
>
> Ok sql has seen a null well good for it ... but why its an error !?
>
> Thanks
>
> Nicolas Dufour

I guess there's a couple of ways of looking at your question.
Are you saying that you're using a prepared statement and the value x is a 
variable?

That you then get in to trouble when x is a NULL?

If so you can't use x=NULL. I guess in simple terms you have two different 
data types. (NULL has a special meaning).

For NULL, you have to use the IS NULL syntax.

Or am I missing something?


-- 
Michael Segel
Principal
MSCC
(312) 952-8175

Reply via email to