E
EManning
Using A2K adp, SQL 2000.
I have the following stored proc that I'd like to output a string. I keep
getting an error "Incorrect syntax near the keyword 'case'. Can someone
tell me what's wrong? Thanks.
Create Procedure spAbbreviation
@ToBeAbbreviated varchar(50),
@Abbreviation varchar(10) OUTPUT
As
case @ToBeAbbreviated
when 'Anesthesiology' then @Abbreviation = '(A)'
when 'Med/Peds' then@Abbreviation = '(M/P)'
end
I have the following stored proc that I'd like to output a string. I keep
getting an error "Incorrect syntax near the keyword 'case'. Can someone
tell me what's wrong? Thanks.
Create Procedure spAbbreviation
@ToBeAbbreviated varchar(50),
@Abbreviation varchar(10) OUTPUT
As
case @ToBeAbbreviated
when 'Anesthesiology' then @Abbreviation = '(A)'
when 'Med/Peds' then@Abbreviation = '(M/P)'
end