Subject | Re: using case, coalesce... in fb 1.5 views |
---|---|
Author | matej1602 |
Post date | 2003-07-30T09:45:40Z |
> Show us the DDL statement of your view, and we might beI create simple table:
> able to help.
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:
CREATE VIEW my_view
AS
SELECT
(CASE WHEN b is null
THEn 2
ELSE 0
END) as myfield
FROM a
... and get error. (Dynamic SQL Error SQL error code = -607 Invalid
command must specify column name for view select expression).
This works fine with oracle db.
Thanks for help.
Matej