COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => COGNOS DecisionStream/Data Manager => Topic started by: terry_stjean on 22 Jul 2013 02:53:37 PM

Title: Update variable from SQL node
Post by: terry_stjean on 22 Jul 2013 02:53:37 PM
Is there anyway to update a variable from a SQL node or do I need to use a Procedure node?
Title: Re: Update variable from SQL node
Post by: MFGF on 23 Jul 2013 05:50:30 AM
Hi,

You can reference a variable to grab its contents from within a SQL node, but there is no way of updating it from within the node. Your best bet is to use a procedure node to update the variable.

If you want to return the results of a select (for example) into a variable, just use a lookup() function within your Procedure node

eg

$YourVariable := lookup('Your Data Source','select max(xxx) from yyy');

Cheers!

MF.
Title: Re: Update variable from SQL node
Post by: terry_stjean on 23 Jul 2013 11:10:31 AM
Thank you.