Subject | Re: [firebird-support] Re: case when .. else ..end |
---|---|
Author | Helen Borrie |
Post date | 2005-10-19T14:08:29Z |
At 11:16 AM 19/10/2005 +0000, you wrote:
are using either InterBase or Firebird 1.0.x, which don't support case
expressions.
./heLen
>ERROR:The second one is wrong. If the first one doesn't work then I suspect you
>
>/**************
>The next statement causes the following error:
>
>Invalid token.
>Dynamic SQL Error.
>SQL error code = -104.
>Token unknown - line 11, char 8.
>when.
>*********************************/
>
>I tried following way
>FOR SELECT
> MP.RoleID,
> case
> when MP.RoleID = -1 then 'All Users'
> when MP.RoleID = -2 then 'Superuser'
> when MP.RoleID = -3 then 'Unauthenticated Users'
> else R.RoleName
> end
>FROM AAA MP
>
>and also using double quote,
>
>FOR SELECT
> MP.RoleID,
> case
> when MP.RoleID = -1 then "All Users"
> when MP.RoleID = -2 then "Superuser"
> when MP.RoleID = -3 then "Unauthenticated Users"
> else R.RoleName
> end
>FROM AAA MP
are using either InterBase or Firebird 1.0.x, which don't support case
expressions.
./heLen