ODBCQueryTool icon indicating copy to clipboard operation
ODBCQueryTool copied to clipboard

Scripting enhancement - assign a variable the value of other variables

Open GStegemann opened this issue 1 year ago • 0 comments

Hello,

in a script I need to save results from a database query for a next query. For this it would be great to store the value of a result variable to another variable bound as input.

Sample:

-- Result variables
:variable1 COLUMN LONG;
:variable2 COLUMN LONG;
:variable3 INPUT LONG;

-- Check if current host is defined in table OBJECTS
:select on;
select parentid,objectid from OBJECTS where classname = 'Flink' and objectname = 'HOSTXX';

-- Is it the right value?
:if variable2 = 0;
:print 'ERROR: No such host in Objects';
-- Exit now
:if variable2 = 0;
:file close;
:if variable2 = 0;
:exit;

-- Next test if application is already defined
select objectid from OBJECTS where classname = 'Flapp' and objectname = 'XxxApp';
:variable3 = variable2;
:if variable1 = 0;
:print 'No such application in Objects';

Would it be possible to implement this feature?

GStegemann avatar May 21 '24 14:05 GStegemann