When you set criteria for a query, you can apply a list of values to the criteria. Query will check the values and return only the records that match. The following characteristics apply to the In operator in Studio Query:
- A query can contain multiple In operators.
- A query statement cannot exceed 65,536 characters.
You can copy and paste data into a static list, or you can specify a dynamic lookup list—either a file you import or an SAP lookup table.
Use a static list
- In the list of operators, click In and then click the empty box or the List Builder button.
- In the List Builder box, be sure that Static Value List is selected, and then do one of the following:
- Type the values, and you can type descriptions for the values. For example, type 1000 for the value and Plant in Bothell for the description.
- Click Import. Query gives you three options for importing a list: From File, From Cut/Copy & Paste, and From SAP F4 Lookup.
Import from a file
- Click the Browse button and locate the file that you want to use
If you use a text file, you will need to specify the separators.
- Enter the file's rows and column that you want to use for the list.
You can also choose to trim leading or trailing spaces.
- Click OK twice.
Import from Cut/Copy & Paste
- Paste the contents of your list, and then click Next.
- Specify separators—the characters that signal the start of a new column and the start of a new row.
If you need to go back and check which separator is used, click Back.
To limit the data that is available for the list, specify start and end rows.
You can also choose to trim leading or trailing spaces.
- Click Next.
- Choose the column for the values, and then click Finish.
- Click Finish, and then click OK.
Import from SAP F4 Lookup
In the window that opens, select the check boxes for the items you want to include in your lookup list, and then click OK twice.
Use a dynamic list
- In the list of operators, click In and then click the empty box or the List Builder button.
- In the List Builder box, click Dynamic Lookup List, and then click Current Data Set File or Linked Excel or Text File.
- Click Configure Dynamic List.
If you are using a linked file, click the Browse button and locate the file that you want to use.
- Enter the file's rows and column that you want to use for the list.
You can also choose to trim leading or trailing spaces.
- Click OK twice.