KMK.SQLCMD "SQL statement" {NO-MESSAGE}
KMK.SQLCMD is a Kourier Service command that executes a standard SQL statement. If used without the NO-MESSAGE keyword, the output of the SQL command is captured into a Kourier message and sent to the target DSN. If used with the NO-MESSAGE keyword, the SQL command is executed but no message is sent to the target DSN.
|
Indicates that the output of the SQL statement should NOT be captured and sent to the target DSN. |
This command MUST be used in a Kourier Service and it MUST be the first command in the service.
KMK.SQLCMD "SELECT TOP
10 * FROM KOURIER_RUNLOG" USING TSQL_WAHOO EXPORT-FORMAT "PIPE"
In this example, the SQL statement returns the first 10 rows from the KOURIER_RUNLOG table. The output of this command can be sent to any target DSN, such as a directory on the sales intranet website.
KMK.SQLCMD "exec
SP_WHO" USING TSQL_WAHOO EXPORT-FORMAT "PIPE"
In this example, the SQL Stored Procedure SP_WHO is executed. The output of this command can be sent to any target DSN, such as a directory on the sales intranet website.