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


EKE
  •  EKE
  • No customer Topic Starter
2016-01-07T20:20:33Z
Hi!

A select-statement (SQL) returns the output of multiple values. Each value should be assigned to a variable. Example: A select-statement return the following values: 3, %, Month, 1515911, 51951591 Each value should be assigned to a seperate variable. (Variable 1 => 3, Variable 2 => %, Variable 3 => Month, Variable 4 => 1515911, Variable 5 => 51951591)

Solution is appreciated!

Thank you.
Sponsor
Forum information
Support
2016-01-07T21:04:21Z
Hi,

There is no method for doing this that way. It might be easier just to reference the output from the select..There are Variable functions to retrieve a certain column or row (please refer snapshot) so that can be combined with the output value of the SQL Task to either extract a certain value or use multiple Set Variable Task and extract and set the value, one at a time.
variable.png
Michael
Support
http://www.visualcron.com 

Please like  VisualCron on facebook!
chavalit
2016-02-23T16:34:57Z
Hi
what about the function, can I store the result in variable too?

Thanks
Support
2016-02-24T09:02:06Z
Originally Posted by: chavalit 

Hi
what about the function, can I store the result in variable too?

Thanks



You can use the Set Variable Task to store the the result. However, there is no need for that as it is already stored in output {TASK(PrevTask|StdOut)}
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
chavalit
2016-02-24T10:17:00Z
Hi,
I am not sure what you mean. The function is a function in Oracle and I have to call them in a SQL task like this:

declare
t varchar(10);
begin
t := myschema.myfunction(parameter);
end;

How can I get "t" the result of the function? The output variable {TASK(PrevTask|StdOut)} does not do that.
Or is there another way to call the function?
Support
2016-02-24T10:39:32Z
Originally Posted by: chavalit 

Hi,
I am not sure what you mean. The function is a function in Oracle and I have to call them in a SQL task like this:

declare
t varchar(10);
begin
t := myschema.myfunction(parameter);
end;

How can I get "t" the result of the function? The output variable {TASK(PrevTask|StdOut)} does not do that.
Or is there another way to call the function?



I see, I thought you were talking about VisualCron Variables. I have not tested this with Stored procedures, only Text, but you can test creating an output parameter with the same name. See example here:

https://technet.microsof...7004%28v=sql.105%29.aspx 

Now, if it does not show when refreshing the stored procedure you can add the parameter manually.

When added you can go to the Variables of the Task and you will see the Parameter Variables in Result node:

{TASK(PrevTask,Result.Parameter.Value,myoutputtest)}

(replace myoutputtest with the name of the output column)
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
chavalit
2016-02-24T11:02:50Z
Thanks, but I think that will not work with oracle. I came up with the idea, to use
select myschema.myfunction(Parameter) from dual.
It works!
Scroll to Top