Subject RE: [firebird-support] Re: using case, coalesce... in fb 1.5 views
Author Thomas Steinmaurer
> > ... and get error. (Dynamic SQL Error SQL error code = -607 Invalid
> > command must specify column name for view select expression).
>
> Because the above isn't a valid view definition.
>
> Try:
>
> CREATE VIEW my_view
> myfield
> AS
> SELECT
> (CASE WHEN b is null THEN 2 ELSE 0 END)
> FROM a;


pah, missed some parenthesis:

CREATE VIEW my_view (
myfield
) AS
SELECT
(CASE WHEN b is null THEN 2 ELSE 0 END)
FROM a;


Thomas.