I am using the expression builder in a Execute SQL task to build a SQL statement on the fly. The expression builder does not use the CHR, CHAR,ASCII functions. I cannot get it to place a double quote mark into the SQL statement. I have used every combination of single and double quotes. I have tried ["], """, """", """"". I am at a lose.
The statement below I need double quotes to appear in the final SQL statement where the chr(34) appears in the four locations. Thanks in advance for any help.
"Exec master.dbo.xp_cmdshell 'blat - -attach " + @ExcelDirectory+ "Incentive_" +
@EndDate + ".xls -to " + @RecipientList +
" -from COLODBN1@xxxxx.com -s " + chr(34) + @EmailSubjectText + " for " +
@StartDate + " Through " + @EndDate + chr(34) & " -body " + chr(34) + @EmailBodyText + chr(34) + " ' "