In operator without (). (Error 2429)

When coding an SQL statement that includes the In operator, you must surround the list of items to test with parentheses. For example, to see if a value is one of a set of values, you could use the following code in the WHERE clause of an SQL query:

WHERE Region In ('TX', 'CA', 'WA')

This code tests to see if the Region field contains any of the above abbreviations, which represent Texas, California, and Washington.



Community Additions

Show:
© 2014 Microsoft