Using the TSQL Shell
The TSQL Shell is one way to execute Transact-SQL code from Caché.
To use the TSQL Shell, invoke the TSQLShell()Opens in a new tab method from the Terminal as follows: DO $SYSTEM.SQL.TSQLShell(). This invokes the Caché SQL Shell and sets its DIALECT configuration parameter to MSSQL.
You can perform the same operation by invoking the SQL Shell from the Terminal as follows: DO $SYSTEM.SQL.Shell(), then setting the DIALECT configuration parameter. The SQL Shell supports three SET DIALECT options: MSSQL, Sybase, and Cache.
When in multiline mode, the GO command is used to execute a multiline TSQL statement and exit multiline mode. This statement delimiter is configurable to the statement delimiter defined in imported TSQL code.
For further details about this shell, refer to the “Using the SQL Shell Interface” chapter of Using Caché SQL.
Other Ways to Execute Transact-SQL Code
You can also execute Transact-SQL code:
-
as ClassMethod methodname() [ Language = tsql, SqlProc ],
-
as Dynamic SQL program using the %Dialect property.
-
from the Management Portal Execute SQL Statements option, by setting the Dialect option, which is displayed if you click the more option.