Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3 set_var_from_query command

open
nobody
None
5
2013-02-20
2008-03-25
Anonymous
No

help set-var-from-query
SYNOPSIS: set-var-from-query [<varname> <sql query>]

DESCRIPTION: Wit is retrieved from the sql query. The first colomn from the first row is used to set the variable. Variables are expanded in any command you issue on the commandline. Variable expansion works like on the shell with the dollarsign. Both forms, $VARNAME and ${VARNAME}, are supported. If the variable is _not_ set, then the text is left untouched. So if there is no variable $VARNAME, then it is not replaced by an empty string but stays '$VARNAME'. This is because some scripts use wierd identifiers containting dollars (esp. Oracle scripts) If you want to quote the dollarsign explicitly, write two dollars: $$FOO means $FOO Requires valid session.

Discussion

  • set_var_from_query.patch