May 26, 2010 at 3:41 am
I have written a stored procedure that updates data, it runs ok until it reaches the name Milly's.
I know the problem is with the quotation but I am not sure how to correct it.
the fields are ORG= '''+@FIELD1+''',
Field 1 equals Milly's
Edited: Today @ 10:35:03 AM by clucasi
May 26, 2010 at 3:45 am
May 26, 2010 at 4:48 am
i have tried to use the below code but it errors
,ORGANISATION= '''+@FIELD18.replace("'","''")& ''' ,
May 26, 2010 at 5:42 am
This was removed by the editor as SPAM
May 26, 2010 at 8:26 am
In SQL2008 you can do this:
',ORGANISATION = ' + convert(varchar, cast(@FIELD18 as varbinary ),1)
In SQL2005 you need to use system function:
',ORGANISATION = ' + master.dbo.fn_varbintohexstr(cast(@FIELD18 as varbinary ))
See, you will not even need a quotes!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply