Subject | Re: [firebird-support] Re: case when .. else ..end |
---|---|
Author | Martijn Tonies |
Post date | 2005-10-19T11:21:19Z |
> ERROR:Check the syntax of the CASE statment in the Firebird
>
> /**************
> The next statement causes the following error:
>
> Invalid token.
> Dynamic SQL Error.
> SQL error code = -104.
> Token unknown - line 11, char 8.
> when.
> *********************************/
release notes.
> I tried following wayWhy would you do that? String literals are ALWAYS
> 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,
inside single quotes.
Object names CAN be in double quotes.
>With regards,
> 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
Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com