Remote Database Query CCL Statement

The CCL statement can be either a DATABASE statement or may be a subquery that makes a remote query call.

Below is a pseudocode example:

-- Create the table.
EXECUTE STATEMENT DATABASE "LocalOracleDB4"
[[CREATE TABLE Data1 (
Integer_col INTEGER, 
Long_col NUMBER(21)
)]]
SELECT SetupStream.command AS command
FROM SetupStream
WHERE command = "CREATE TABLE"
;

If there is no filter (such as a WHERE clause), the CREATE TABLE statement is called each time a new row arrives in any of the streams involved in the CCL statement.

Note: As with database subqueries, Sybase CEP Serverhas no knowledge of when information on the remote system is changed. The remote database server cannot notify Sybase CEP Server when data changes; the server does not see updated information until a row arrives in one of the query's streams. The server then executes a statement on the remote database server. There are indirect ways that the remote database server can notify Sybase CEP Server of data changes. For example, the remote database server could use a trigger to call a piece of code that would act as an input adapter to Sybase CEP Server.

For more information about the syntax of these CCL statements and clauses, see the Sybase CEP CCL Reference Guide .