I have a very long inline query that even when i set the nvarchar property to MAX the text gets truncated. Is there any way to make the sp_executesql to take a varchar instead.
When i try to change the nvarchar to varchar, i get an error, i have tried ntext too but same results.
Edit:
Based what i read on the question that were posted on the answer, this should work but it dosen't can anybody tell me why ?
Declare @X varchar(MAX)
SET @X = N'Select * From Users'
Execute sp_executesql @X
While this works with no problems:
Execute sp_executesql N'Select * From Users'