Use the Condition page of the SQLAssist SmartGuide to specify a search condition for an SQL statement. You can specify multiple search conditions; you specify each search condition in a separately numbered Condition page. The search conditions supplement any joins specified in the Join page, that is, the joins and the search conditions appear in the WHERE clause of the SQL statement.
Use the Value Lookup window to find appropriate values for a search condition. You can look for values that include a specific character string or you can display all the values in the column. The % character is a wildcard character. For example, specifying A% searches for values that begin with the character A. Specifying %1 searches for values that end with the character 1. The specification A%1 searches for values that begin with the character A and end with the character 1.
Specify the character string in the Search for field and select Find now. Check the Case sensitive checkbox if you want to search for the characters in upper or lower case, exactly as entered in the Search for field.
Select a value from the Maximum hits list to control the number of values returned for the search.
To display all the values in the column, select Find now; do not specify anything in the Search for field.
Results are displayed in the Available values list up to a maximum number of rows as specified by the Maximum hits value. Select an appropriate value or values from the list, and select Use values. The selected values are added to the Values list in the Condition page.
Select Close to close the Value Lookup window.
To cancel value lookup and remove any values selected from value from the Available values list, select Cancel.
To remove the values from the Values list in the Condition page, select Clear.
You can also specify parameters in the Values list. If a parameter is specified, its value is used in the search condition. A parameter is specified in the format :parm, where parm is the parameter name. For example, :empid is a valid specification for a parameter named empid.
After you specify the first search condition, select Find on another column. This displays a second search condition window (the tab for the page is labeled Condition 2). Specify the second search condition as described in Specifying a search condition.
Specify a third condition for the query by selecting Find on another column in the Condition 2 page. Repeat the process until you specify all the search conditions for the query.
Select the condition page for the condition. Then select Delete Condition.
When you finish specifying the search conditions, select Next. This displays the Columns page of the SQLAssist SmartGuide. Use that page to specify the table columns to display in the result set.
Select Back to display the Join page of the SQLAssist SmartGuide. If appropriate, you can then change the joins specified for the SQL statement.
You can also display any page in the SQL Assist SmartGuide by selecting its tab.
When you complete the specification of your SQL statement, select Finish. This generates the code for the SQL statement and closes the SQLAssist SmartGuide.
To cancel the visual composition of the SQL statement, select Cancel.