Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stored procedure

Status
Not open for further replies.

samantha72

Programmer
Jul 31, 2001
14
0
0
CA
Hi I am trying to send the stored procedure 2 parameters as inputs. one is language and the second is the country id and i would like to get the description back as an output but this is not working. Please help

CREATE PROCEDURE dbo.DisplayCountry_pr
@language int, @countryid int,
@countrydesc varchar(35) out
AS

BEGIN

if @language = 1
Select @countrydesc = english_desc from country
where @countryid = country_id

else
Select @countrydesc = french_desc from country
where @countryid = country_id

END
 
CREATE PROCEDURE dbo.DisplayCountry_pr
(
@language int
, @countryid int
, @countrydesc varchar(35) output
)
AS
Begin
if @language = 1
begin
Select
@countrydesc = english_desc
from
country
where
@countryid = country_id
end
else
begin
Select
@countrydesc = french_desc
from
country
where
@countryid = country_id
end
return 0
end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top