Tech Tip: Order in combining Query by Attribute and Query commands
PRODUCT: 4D | VERSION: 15.1 | PLATFORM: Mac & Win
Published On: May 20, 2016
The QUERY BY ATTRIBUTE and QUERY commands can be used together querying. The order does not matter in arriving to the appropriate query. The example below of simple data displays that the order does not matter:
Example #1: Using the QUERY command first.
QUERY([Persons];[Persons]FirstName="Bob";*) QUERY BY ATTRIBUTE([Persons]; & ;[Persons]OB_Info;"age";=;20) // Query result with Bob with age 20 |
Example #2: Using the QUERY BY ATTRIBUTE first.
QUERY BY ATTRIBUTE([Persons]; & ;[Persons]OB_Info;"age";=;20;*) QUERY([Persons];&;[Persons]FirstName="Amy") // Query result with Amy with age 20 |