AnsweredAssumed Answered

Group comparisons in ExecutiveSQL statement

Question asked by JamesPeragine on Jun 13, 2017
Latest reply on Jun 14, 2017 by JamesPeragine

New to SQL so please forgive me if this is an obvious question.

 

If you have a lot of conditions in an ExecuteSQL statement.  Is there a way to group certain comparisons keys that will be in every OR condition

 

example:

 

ExecuteSQL (" SELECT \"_pk\" FROM table WHERE

SalesPersonSort = SalesPerson AND TimeZoneSort = TimeZone AND SkyColorSort = SkyColor OR

SalesPersonSort = SalesPerson AND TimeZoneSort = TimeZone AND WallColorSort = WallColor OR

SalesPersonSort = SalesPerson AND TimeZoneSort = TimeZone AND FloorColorSort = FloorColor OR

SalesPersonSort = SalesPerson AND TimeZoneSort = TimeZone AND WallShapeSort = WallShape "; ""; "")

Outcomes