• Jayraj.Todkar (9/16/2009)


    Hi,

    Is there any solution to overcome this situation?

    Best Regards,

    Jayraj Todkar

    I am not entirely sure of the problem but you may try to entity encode the variables that you will be using to handle the special characters. An example of doing this is the following. You will see in the select that special characters are encoded:

    DECLARE @lastName nvarchar(MAX)

    DECLARE @encodeLastName nvarchar(MAX)

    SET @lastName = N'sddgdf@#$%^& '

    SET @encodeLastName = CONVERT(nvarchar(max), (SELECT @lastname FOR XML PATH('')) )

    SELECT @encodeLastName [@encodeLastName]

    Run the example to see that the output has special characters entity encoded.