Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


JeanetteW
2010-04-22T17:03:06Z
Can a Visual Cron variable to used within the SQL Text Query of a SQL task? What I'm trying to do is pull all data changes since last execution date of the Visual Cron job.

Thanks!
Sponsor
Forum information
Support
2010-04-27T10:21:28Z
Sorry for the late response. Yes, you can use Variables in every field in VisualCron - including the SQL text field.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Ankeet
2021-02-01T16:31:38Z
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?
Gary_W
2021-02-02T15:27:25Z
Put your task variable inside of quotes and remove them from the variable itself?

declare @filePath varchar(255) = '{TASK(166aee37-f000-4426-ae2a-89187105ded7|StdOut)}'
Scroll to Top