Re: [SQL] Weird NULL behavior

2002-11-07 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Thu, 7 Nov 2002, Tom Lane wrote: >> I am kind of inclined to remove the arithmetic operators on "char" >> (+,-,*,/) in 7.4 --- they don't seem to have any real-world uses, >> and as this example illustrates, they are perfectly positioned to >> capture

Re: [SQL] Weird NULL behavior

2002-11-07 Thread Stephan Szabo
On Thu, 7 Nov 2002, Tom Lane wrote: > Stephan Szabo <[EMAIL PROTECTED]> writes: > > On Thu, 7 Nov 2002, Ludwig Lim wrote: > >> SELECT CAST ( (NULL*NULL) AS NUMERIC(2,0)); > >> Cannot cast type '"char"' to '"numeric"' > > > It seems to me that it's trying to decide on a type > > for the expression

Re: [SQL] Weird NULL behavior

2002-11-07 Thread Tom Lane
Stephan Szabo <[EMAIL PROTECTED]> writes: > On Thu, 7 Nov 2002, Ludwig Lim wrote: >> SELECT CAST ( (NULL*NULL) AS NUMERIC(2,0)); >> Cannot cast type '"char"' to '"numeric"' > It seems to me that it's trying to decide on a type > for the expression NULL * NULL. It's a NULL, but a > NULL of what ty

Re: [SQL] Weird NULL behavior

2002-11-07 Thread Stephan Szabo
On Thu, 7 Nov 2002, Ludwig Lim wrote: > Hi: > > Has anyone encountered this before? > SELECT CAST ( (NULL*NULL) AS NUMERIC(2,0)); > > > returns the following error message: > Cannot cast type '"char"' to '"numeric"' It seems to me that it's trying to decide on a type for the expression NU

[SQL] Weird NULL behavior

2002-11-07 Thread Ludwig Lim
Hi: Has anyone encountered this before? SELECT CAST ( (NULL*NULL) AS NUMERIC(2,0)); returns the following error message: Cannot cast type '"char"' to '"numeric"' But the following sql statements returns NULL: select NULL: select NULL * NULL; select cast ( NULL as NUMERIC(2,0)