Forum Stats

  • 3,855,378 Users
  • 2,264,500 Discussions
  • 7,905,980 Comments

Discussions

How to use first and last function

900697
900697 Member Posts: 50
edited Mar 27, 2012 4:55AM in Complex Event Processing
Hi,

Is it possible to use first and last function in CQL Select statement.

That is in CQL can we write query like:

Select first(XXX) from channel [rows 5];


Thanks,
Sri
Tagged:

Answers

  • The FIRST & LAST are the aggregate functions which are only applicable in case of Pattern Matching Query.

    As per the OCEP documentation, FIRST returns the value of the specified stream element the first time the specified pattern is matched.

    Please refer to this [OCEP documentation link|http://docs.oracle.com/cd/E12839_01/doc.1111/e12048/funcbltag.htm#BABIEBGD] for detailed explanation of these functions.

    Thanks & Regards,
    Sandeep
This discussion has been closed.