hi everyone...
Iam new with stored procedure in Sql 2005
so iam facing a problem which i need to get the result of query to store in an sql output parameter
here is my SP :
ALTER PROCEDURE [dbo].[CheckUser]
(
@Id nvarchar(50) ,
@Pass nvarchar(50) ,
@Exist int output ,
@Type char(1) output
)
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for procedure here
declare @tt int
declare @char char
select @tt=count(*) from Users where Id=@Id and Password=@Pass
select @char=users.Type from users where Id=@Id and password=@Pass
set @Type=@char
set @Exist=@tt
END
so i would to retrieve the results of the 2 queries & store them in @Exist & @Type..
how can i do that