Subject | Re: [firebird-support] case when .. else ..end |
---|---|
Author | Helen Borrie |
Post date | 2005-10-19T10:52:44Z |
At 10:18 AM 19/10/2005 +0000, you wrote:
<identifier> isn't used in the [FOR] SELECT......INTO syntax; but, if it
were used, single-quotes are not valid delimiters for an identifier.
./heLen
>Can any body tell me what is the problem what is the problem in myTake out the symbols AS 'RoleName'. The main thing wrong is that the AS
>case statement?
>
>CREATE PROCEDURE AAABBB(
> PORTALID INTEGER)
>RETURNS (
> AID INTEGER,
> NAME VARCHAR(50))
>AS
>BEGIN
>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
> AS 'RoleName'
>
>FROM AAA MP
>LEFT JOIN BBB R ON MP.RoleID = R.RoleID
>INTO :AID, :Name
>DO SUSPEND;
>
>END
<identifier> isn't used in the [FOR] SELECT......INTO syntax; but, if it
were used, single-quotes are not valid delimiters for an identifier.
./heLen