GETTIMESTAMP()

Scalar. Returns the timestamp of a row.

Syntax

GETTIMESTAMP( name ) GETTIMESTAMP(FIRST( name )) GETTIMESTAMP(LAST( name )) GETTIMESTAMP(PREV( name )) GETTIMESTAMP()
Parameters

name

The name of a stream or window.

Data Types

Return

name

Timestamp

String

Usage

Using this function with an embedded FIRST or LAST function returns the timestamp of the first or last row of a window, respectively, based on the window's sort order. Using it with an embedded PREV function returns the timestamp of the immediately previous row of a stream or window.

You can only use this function without an argument as part of a filter expression when subscribing to a stream or window. See "Out-of-process Adapter" in the Sybase CEP Integration Guide for more information.

Example

INSERT INTO OutStream
SELECT COUNT(*)
FROM InputWindow
WHERE GETTIMESTAMP(InputWindow) >= (NOW() - 5 SECONDS);