October 29, 2009 at 8:03 am
I currently have
set @strbig ='db=' + @db + ' and (' + @word + '' + ')' which produces
db=47 and ("steel" and "iron") and I need it to produce
'db=47 and ("steel" and "iron")'.
so when I try this set @strbig = ''db=' + @db + ' and (' + @word + '' + ')'' it blows up I can do this
with " set @strbig = '"db=' + @db + ' and (' + @word + '' + ')"'. so its just not ok with the single ticks.
thanks
October 29, 2009 at 8:06 am
October 29, 2009 at 8:09 am
465789psw (10/29/2009)
set @strbig = '"db=' + @db + ' and (' + @word + '' + ')"'.
That will give you the desired output.
October 29, 2009 at 8:09 am
yes I have this
set @strbig ='db=' + @db + ' and (' + @word + '' + ')' which produces the following
db=47 and ("steel" and "iron")
I need it to produce 'db=47 and ("steel" and "iron")'.
October 29, 2009 at 8:20 am
rjv_rnjn (10/29/2009)
465789psw (10/29/2009)
set @strbig = '"db=' + @db + ' and (' + @word + '' + ')"'.That will give you the desired output.
I didn't realize you had double quotes in there. The expression would be
set @strbig = '''db=' + @db + ' and (' + @word + '' + ')'''
Note that at the beginning and end of the expression you have three single quotes ('''). If you want a single quote in an expression then you need to escape it with another single quote.
October 29, 2009 at 8:26 am
thanks that worked
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply