SQL Query variable truncated? - VisualCron - Forum

Community forum

Mikael
2018-02-21T15:43:22Z
Hi

I have a SQL Query task which returns a large chunk (~45kb) of XML along with a few extra columns. I'm saving the XML data to a file, and one of the following columns contains the file name, which I put in a separate variable. It's worked fine previously, but today I noticed the job failing due to the file name variable returning "Error in Argument".

If I look at the content of {TASK(<uuid of SQL Query task>|StdOut)} the output is 44,093 characters, and then it says "[VARIABLE VALUE TRUNCATED]" as part of the output. The task is set to UTF-8

Is there a hard limit on the output length from a SQL Query task?
Mikael
2018-03-01T08:48:10Z
Any ideas?

It seems the value is truncated even if I just look at the StdOut value from the task, so it's not a problem with putting it in job variables.
Support
2018-03-01T09:07:23Z
Does is say exactly "VARIABLE VALUE TRUNCATED"? Because that is not anything that comes from VC then - must be something with the stored procedure or SQL query.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
thomas
2018-03-01T16:53:03Z
1) Can you show your query? (you can obscure tablenames if you like)
2) Does it produce an error if you run it in SSMS?
3) How do you connect to Sql server ? (ie native, odbc)
Mikael
2018-03-02T11:41:42Z
Originally Posted by: Support 

Does is say exactly "VARIABLE VALUE TRUNCATED"? Because that is not anything that comes from VC then - must be something with the stored procedure or SQL query.


I found the source of my confusion. When you preview the variable in the Variables dialog it will truncate long values. However the value is not actually truncated on use (confirmed by writing the variable to a file). My error is likely found elsewhere.

Apologies for barking up the wrong tree.
Scroll to Top