Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Using PRINT function

$
0
0

Hello,

The piece of code I am working on is expected to return the string below:

This script is testing the use of N' and is working fine

Here is the actual script:

DECLARE@SQL VARCHAR(MAX)
SET @SQL = 'This script is testing the use of N'' and is working fine '
SET @SQL = ''PRINT'' + @SQL
EXECUTE (@SQL)

It runs fine but does not return the expected result.

What am I doing wrong?

Thank you.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>