Subject | Re: [firebird-support] Null to Zero conversion |
---|---|
Author | Martijn Tonies |
Post date | 2003-08-29T07:46:46Z |
Hi,
SELECT Col1, Col2, CAST(0 as <datatype of col3>)
...
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
> Thanks for your precious help.That's good to hear. This is exactly why Arno added COALESCE :-)
> Martijn, I solved the problem using COALESCE.
>About the union thing, I have tried it before posting my question but I gotthe following error >message:
> Invalid token.where col3 is NULL from table unioun
> Dynamic SQL Error.
> SQL error code = -104.
> Invalid command.
> Data type unknown.
> Nikolay the query is the same as you suggested. i.e:"select col1, col2, 0
> select col1, col2, col3 where col3 is NOT NULL from table"I still believe it should work if you do:
SELECT Col1, Col2, CAST(0 as <datatype of col3>)
...
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com