Subject | Re: [firebird-support] Re: using case, coalesce... in fb 1.5 views |
---|---|
Author | Martijn Tonies |
Post date | 2003-07-30T10:14:42Z |
How about,
AS
SELECT
(CASE WHEN b is null
THEn 2
ELSE 0
END)
FROM a
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
> > Show us the DDL statement of your view, and we might beCREATE VIEW my_view (MYFIELD)
> > able to help.
> I create simple table:
> CREATE TABLE A
> (B INTEGER);
>
> Then I try with simple select with use of case, which work fine:
> SELECT
> (CASE WHEN b is null
> THEn 2
> ELSE 0
> END) as myfield
> FROM a
>
> Then I try same with view:
AS
SELECT
(CASE WHEN b is null
THEn 2
ELSE 0
END)
FROM a
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com