With SQL Server 2008, I'd like to add a variable (@wfID
) into a text, like below:
DECLARE @wfID uniqueidentifier
SET @wfID = NEWID()
'<META http-equiv="Content-Type" content="text/html; " /> <br><input type="button"
value="" onclick="window.open("http://localhost/TestWeb2/Test_Look.aspx?Test_ID='
+ convert(nvarchar, @wfID)
+ '");" /></br>',
So, I'd like to add the @wfID
to the text but it always says
The data types nvarchar and text are incompatible in the add operator.
I tried converting everything into nvarchar, but then I got this:
Arithmetic overflow error converting expression to data type nvarchar.
Any suggestions?