Run SQL command

Previous Next

Logs on to "Application" in "Database account" and executes "SQL Command".

If "Metadata" = 'Y', logs on to the USoft Definer as opposed to the User Application.

Parameters

Name

Type

Optional?

Application

Application

No

Database account

Database account

No

SQL command

SQL command

No

Metadata Y/N

Option flag

No

Path variables in the "SQL Command" parameter value

In the "SQL command" parameter value, you can use path variables other than $$unpack and $$using in the SELECT list of the following INVOKE calls:

INVOKE XML.EXPORT,

INVOKE XML.IMPORT,

INVOKE USXSL.APPLY2FILE,

INVOKE BATCHRUNNER,

if the SELECT output list contains only one or more of the following:

Constants,

Simple column names,

The '*' wildcard.

In other words, a SELECT output list using a path variable may NOT also contain any SQL functions. Non-quoted and double-quoted aliases are allowed. Constants may be single-quoted (string constants) or non-quoted (numeric constants).

Path variables are resolved when you have the task checked (press the Check button in the Define Tasks window). You can inspect the result in the Value column of the Parameters box.

The following 2 examples of "SQL Command" parameter values show legal use of path variables in "SQL Command" parameter values:

Example 1

INVOKE USXSL.EXPORT WITH

SELECT       '$$release\custom\file1.xml'  WriteOutputTo

,            *

FROM         mytable

 

Example 2

INVOKE BATCHRUNNER.myjob WITH

SELECT       '$$install\temp\file1.xml'    "input_file"

,            column1                       "computed_column"

,            220                           "factor"

,            '$$release\custom\file1.xml'  "output_file"