Subject | Re: [firebird-support] Problems with NULL |
---|---|
Author | James Chua |
Post date | 2003-12-11T11:19:15Z |
Hi
Marc Geldon wrote:
into a null. Why do you have all these value in null? Why not put a ZERO
as their default value?
Marc Geldon wrote:
> Hello!Base on my experience, any calculations with a null value could result
>
> I have a problem with "NULL". If I run a statement like SELECT
> CAST(NULL AS INTEGER)+1 AS NUMMER FROM WHATEVER the result is NULL!
>
> That's a problem. I had a SQL which was running on mySQL. Some sort of:
>
> INSERT INTO WHATEVER (NUMBER, USER)
> SELECT (MAX(NUMBER)+1) AS NUMBER,
> "a name" AS USER FROM WHATEVER
>
> In mySQL it worked very well. In FB not! He tells me something about
> datatype not known and so on. Also a CAST AS INTEGER does not work.
> How can I convert this NULL into a 0?
>
> Please help!
>
> Thank you very much in advance!
>
>
> best wishes,
>
> Marc
>
into a null. Why do you have all these value in null? Why not put a ZERO
as their default value?