Subject | RE: [firebird-support] Re: using case, coalesce... in fb 1.5 views |
---|---|
Author | Thomas Steinmaurer |
Post date | 2003-07-30T10:24:54Z |
> > ... and get error. (Dynamic SQL Error SQL error code = -607 Invalidpah, missed some parenthesis:
> > 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;
CREATE VIEW my_view (
myfield
) AS
SELECT
(CASE WHEN b is null THEN 2 ELSE 0 END)
FROM a;
Thomas.