I am trying to do something like this in SQL Task > Text and it fails. What am I doing wrong here?
declare @sql nvarchar(800)
declare @filePath varchar(255) = {TASK(166aee37-f000-4426-ae2a-89187105ded7|StdOut)}
SELECT @filePath
{TASK(166aee37-f000-4426-ae2a-89187105ded7|StdOut)} is the output of a previous task in the same job.
{TASK(166aee37-f000-4426-ae2a-89187105ded7|StdOut)} value = '\\sqlServerShare\c$\FilesForBulkLoad\filename.csv'
This is the error I receive:
Error in SQL query: ERROR [42000] [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '\'.
Ideas?