Facing a problem, it seems my data stored in SQL Server does not stored correctly, simply put, how to verify that a varchar data has carriage return and line feed in it? I try to print them out, does not show the special characters. Thanks
To add to what others have said; when I need to embed newlines in T-SQL, I tend to do;
DECLARE @nl CHAR(2) = CHAR(13) + CHAR(10);
..then use @nl
as required. That's for Windows line-endings, naturally.
Take a look at the Char
function. See MSDN. This will help look for the special characters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With