Hi,I have a stored proc called MyProc1CREATE PROCEDURE [dbo].[MyProc1] @var1 char(2), @var2 smallint, @var3 datetime, @var4 OUTPUT ASBEGINDECLARE @STR int' Code comes here to calculate var4 and STRRETURN @STREND
Problem :I want to call MyProc1 within another proc called 'CallTheProc' and receive the value @STRI have written so far :declare @Id charEXEC MyProc1 'AV',23, getdate(), @Id OUTPUTprint @Id
However I get an error 'Incorrect syntax near ')'. I do not get any values. I know I am using @Id as char whereas it needs to be int. But I want to receive the value as a char.How can I do so?Thanks.