I have a simple sp:
create procedure [dbo].[sp_GetClinicLocation]
@cCID char(5),
@cLocation varchar(50) output
AS
BEGIN
SELECT @cLocation = cLocation
FROM AC
WHERE cClinic = @cCID
END
I'm trying to call the procedure as such:
declare @Test varchar(50)
exec sp_GetClinicLocation '22401',@Test = @cLocation
select @Test
I'm receiving the error message: Must declare the scalar variable @cLocation
Anybody know where I'm going wrong. I'm a stored procedure beginner.
create procedure [dbo].[sp_GetClinicLocation]
@cCID char(5),
@cLocation varchar(50) output
AS
BEGIN
SELECT @cLocation = cLocation
FROM AC
WHERE cClinic = @cCID
END
I'm trying to call the procedure as such:
declare @Test varchar(50)
exec sp_GetClinicLocation '22401',@Test = @cLocation
select @Test
I'm receiving the error message: Must declare the scalar variable @cLocation
Anybody know where I'm going wrong. I'm a stored procedure beginner.