I'm trying to write a stored procedure that has to enter a nvarchar value and an xml value into a table which the table name is also given as a variable(@lesson),as below:
create procedure q @lesson nvarchar(50),@desig nvarchar(30), @xme xml as declare @st nvarchar(200) set @st='Insert into '+ @lesson+ ' (designer,exam) values ('[email protected] +','[email protected] +')' exec(@st)
but i get the following error:"Msg 402, Level 16, State 1, Procedure q, Line 7
The data types nvarchar and xml are incompatible in the add operator."
How can I enter the xml variable along the nvarchar variable in the table?
Thanks in advance