PRB: Parameterized View Discrepancy Using IN() Filter CriteriaLast reviewed: January 20, 1997Article ID: Q156631 |
The information in this article applies to:
SYMPTOMSA Parameterized View returns incorrect results when assigning multiple string values to a parameter of the IN() Filter criteria.
CAUSEThe View Designer is not designed to handle queries where multiple values are assigned to a parameter in the IN() clause.
WORKAROUNDTo use View Designer to create a parameterized View that returns the correct values when using the IN() filter criteria, you need to specify multiple parameters instead of a single one. For example, you would specify the following in the Filter tab of the View:
Field Name = "customer.customer_id" Criteria = IN Example = ?a, ?b, ?cThis will produce the following SQL statement:
SELECT *; FROM tastrade!customer; WHERE Customer.customer_id IN (?a, ?b, ?c)When you browse the View, it will prompt you to enter three parameters. If, for example, you enter "ALFKI," "ANATR," and "ANTON" for the parameters, then three records will be displayed correctly. Alternately, you can assign the strings, for example "ALFKI," "ANATR," and "ANTON" respectively, to each of the variables a, b, and c before browsing the View.
STATUSThis behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
|
KBCategory: kbprg kbprb
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |