Hi,
I have a table for R&D which has following cols:
EmpID|EmpName|EmpLname|
and i want to insert values using parameters from Stored procedure as:
declare @EMPID int;
declare @EmpName varchar(50);
Declare @EmpLname varchar(50);
Declare @aa varchar(max);
set @EmpId=6;
set @EmpName='Ramesh';
set @EmpLname='Kumar';
set @aa='insert into Employee(EMPID,EMPNAME,EMPLname) select '+@EMPID+','+@EmpName+','+@EmpLname+ ' from Employee'
Print @aa
once executing,
I am getting following error:
Conversion failed when converting the varchar value 'insert into Employee(EMPID,EMPNAME,EMPLname) select ' to data type int.
Kindly Suggest