Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Select Clause

In the select clause, you specify columns that will appear in the query results.

In the example, a `select` clause projects two columns, `address` and `name`, properties of the concept `/customer`. The alias for the customer concept is the letter `c`:

    select c.name, c.address from /customer c

You can also give each projection an alias, for example:

    select c.name as name

You can check for NULL values using equality `[=]` operator:

    Select * from /concepts/test as cp where cp.value = null;

The use of the optional "`as`" makes the code more readable.

In the `select` clause you can use the following:

- Literal values
- Catalog functions and rule functions
- Entities that are declared in the `from` clause, unless you are using a `group by` clause (see Group by Clause)

You can use an optional `limit` clause to specify the maximum number of rows to return, and you can use an `offset` to ignore the first `n` rows.

You can use an optional `distinct` clause to prevent the query from returning duplicate rows.

## Examples of Select Clauses

These examples show only the `select` clause. A complete query requires a `select` and a `from` clause. (# is the escape character. See Keywords and Other Reserved Words.)

    select A.*
    select {limit: first 10} A.name
    select /#DateTime/now() as C
    select /RuleFunctions/GetState() as D
    select /#String/concat(B.customerId,”ABC”) as E
    select B.*, A.custId id, B@extId as extId

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.