I'm trying to display the following
'No entry',
'No exit'
in the result set of a sql query (on two seperate lines)... using dynamic sql. could you please spot what I am doing wrong.. I cannot seem to get the quotes right!!
here is the code
declare @scomm1 char
set @scomm1 =
' print ' + '''' + 'No entry' + '''' + ' + ' + ','
' print ' + '''' + 'No exit' + ''''
execute (@scomm1)
'No entry',
'No exit'
in the result set of a sql query (on two seperate lines)... using dynamic sql. could you please spot what I am doing wrong.. I cannot seem to get the quotes right!!
here is the code
declare @scomm1 char
set @scomm1 =
' print ' + '''' + 'No entry' + '''' + ' + ' + ','
' print ' + '''' + 'No exit' + ''''
execute (@scomm1)