This section shows how to use SBN expressions in SQL properties. Although the following example is a Query, the technique applies to both types.
Assume you want a SELECT statement to retrieve a specific customer record.
You might include a constant customer number 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 custom component property. See “Custom properties”. Assuming that value ‘12345678’ was assigned to a property CustNo, the select statement with the dynamic expression looks like:
select * FROM CUSTOMERS WHERE CU_NO = '[REF.CustNo]'
You can use any of the Sybase ETL functions inside the SBN expression. The following statement returns the same record using a value of “1234” for CustNo1 and a value “5678” for CustNo2:
select * FROM CUSTOMERS WHERE CU_NO = '[uConcat (REF.CustNo1, REF.CustNo2)]'