View Single Post
  #1  
Old 09-14-2005, 01:45 PM
mseminatore mseminatore is online now
Registered User
 
Join Date: 09-14-2005
Posts: 17
Macros containing single quotes

I am trying to create a failure step which logs the text of a failed step to a database via SQL. The text of the failed step is as follows:

Error message from the server: 'an item with that name already exists'

The SQL step is essentially:

INSERT INTO errors ("ErrorText") VALUES('%FAILSTEP_OUTPUT%');

The issue is that the single quotes within the text cause an error in expansion of the text so that the last single quote is not passed to SQL Server.

What gets passed to ISQL is:

'Error message from the server: 'an item with that name already exists'
Reply With Quote