To Insert a Data Lookup in Database Mode:

The mapping between the key column and its value can come from database tables.

  1. Select the Data Lookup tool in the palette, and create the action in the diagram.
  2. Select the Data Flow tool, and draw a flow from the preceding step (a data input or action) to the data lookup to initialize it with the incoming data structure columns.
  3. Double-click the data lookup symbol to open its property sheet, and select the Database mode in the Mode list. This triggers the display of the Script tab.
  4. Select the source column from which you want to draw the values to be replaced. Create the target column, which will contain the values returned by the lookup. The target column will automatically replace the source column in the Data Structure Columns tab.
  5. Click the Script tab, select a data connection, and specify a SQL query in the textbox. The query will be executed against the database tables and will return two columns (a key column to search for a corresponding value and a value column to store the corresponding value).

  6. Click OK to save your changes and return to the diagram.


Created October 7, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com