This runs fine in a query window. But when placed inside a job, it truncates the variable
, @pi_Environment = @Environment
, @pi_Verb = @Verb
, @pi_URL = @URL
, @po_JSONResponseText = @JSONResponseText OUTPUT
I have to add this before the execute in the job to make it work.
SET TEXTSIZE -1
Why do I have to add the above in the job but not the query window?
Also, when running a job, who should I run the job as? Is there a generic role that I should use?
I execute a SP and it returns in the variable
@JSONResponseText. Then I use OPENJSON against that variable. I did a research on this and found the answer above only because there are others who had the same issue.
September 11, 2019, 4:44pm
I am talking about when executing it in the sql job not when you run the proc manually.
how are you seeing the value of
@JSONResponseText when this is run in a SQL Job?
In regards to your last comment, I inserted the
@JSONResponseText into a log table to view it and the response is getting truncated.
September 14, 2019, 10:35am
What data type column are you dumping it into