I have a file i want to attach in a send db mail task but the file name is a variable. When I build the whole path and filename as a sql expression - it does not resolve the expression as the filename.
Here is my expression -
It fails around the "+"
Msg 102, Level 15, State 1, Line 5 Incorrect syntax near '+'.
asked Jul 29, 2011 at 11:13 PM in Default
If that is the exact statement from your code, you are missing the leading quote in the expression.
Apart from that I can't find any problems with the statement.
answered Jul 30, 2011 at 12:28 AM
Magnus - In my post I accidentally ommitted but in the t-sql I have it as you mention - it looks right but abends on the '+'
answered Jul 30, 2011 at 01:07 AM