Using SBN expressions in queries

The following examples show how to use SBN expressions in queries.

Examples

A SELECT statement to retrieve a specific customer record might include a constant customer record CU_NO for that record.

SELECT * FROM CUSTOMERS WHERE CU_NO = '12345678'

With SBN you can use a more flexible approach by assigning the constant value of CU_NO to a component variable. Assuming that value ‘12345678’ was assigned to CustNo, the SELECT statement with the dynamic expression would look like the following example:

SELECT * FROM CUSTOMERS WHERE CU_NO = '[REF.CustNo]'

You can use any of the Sybase ETL functions inside the SBN. The following statement returns the same record using a value of “1234” for CustNo1 and a value of “4567” for CustNo2:

SELECT * FROM CUSTOMERS WHERE CU_NO = '[uConcat (REF.CustNo1, REF.CustNo2)'