Access to Columns from Incoming Result Sets

You can access values in the columns of incoming result sets from expressions that you define in an operator.

For example, if you have an Input Source feeding into a Select operator, in the Select’s Where field, you can refer to the Input Source’s columns. To do so, specify the column by name. You can enter column names by hand, or you can use the expressions menu to paste them in for you. The expression you enter in the Where field might be COLOR == "Red" if COLOR is the name of a column in the Input Source’s schema.

If an operator has more than one input feeding into it, qualify the name of the column using the name of the upstream element. For example, if you have an Iterator with inputs from “Aggregate1” and “Aggregate2,” refer to their “Total” columns as Aggregate1.Total and Aggregate2.Total, respectively.

Note: Advanced Users: In the case of the Custom operator (where you cannot use the simple column name), or if you can’t uniquely refer to a column by its name in another type of operator (perhaps the column name is not a valid variable name or two columns have the same name), you can use the accessor methods in the ResultSet class to access the columns by their positions. Each result set is in a variable whose name is the incoming element’s name with the suffix "RS" appended. For example, in the Iterator example above, there would be two result set variables accessible: Aggregate1RS and Aggregate2RS. Data Federation also provides a set of utility functions you can call to ensure that null values are properly handled.
Related concepts
Expressions Menu
Related tasks
Using Expressions and Control Variables in Operators

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.