Writing a CCL Query

Provides an example of a CCL query statement that subscribes to all of the data in the StockTrades data stream and publishes it, row by row, to a stream with an identical schema called StockTradesAll.

Here is an example of the simplest possible Query Statement.

INSERT INTO StockTradesAll 
SELECT * 
FROM StockTrades;

In practical terms, this query is not very useful, since it simply takes data from one data stream and puts it into another stream. However, it illustrates some important CCL syntax and introductory concepts:


Here is an illustration of data flowing from the StockTrades stream to the StockTradesAll stream after passing through this basic query:




Created March 8, 2010. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com