With the AQL pre-processor, quotation marks are not required to distinguish values from other parts of an AQL sentence. Any word that is not in the file dictionary or account master dictionary, is assumed to be a value, provided that it makes sense to use a value in that part of the sentence. If it does not make sense, then an error message is printed and the sentence is aborted.
For referencing item-IDs, the item-ID string should be enclosed in single quotation marks:
list customers '100''101''102'
Spaces between item-IDs are optional. Both item-ID strings and value strings may be included in an AQL sentence:
list customers '100''101''102' with contact = "[barney]"
The example above shows when D3 enforces the rules about single quotation marks surrounding item-IDs and double quotation marks surrounding value strings.
The backslash character may also be used as a string delimiter. This is useful when the string being searched for contains both single and double quotation marks.
In D3, certain exceptions to the rules are allowed. For example:
list entity 88971677 99171776
The single quotation marks that are normally required around the specific item-IDs are no longer required, provided that there are no ambiguities in the AQL sentence. AQL attempts to locate the unresolved items in the AQL sentence as specific item-IDs in the target file, if they could not be resolved as attribute-defining items.
This new set of rules simplifies the syntactical requirements for AQL sentences, yet introduces new variables into the interpretation of AQL sentences. For example:
list md 'description'
This requests the specific item-ID description from the master dictionary of the current account, and only shows that item. By contrast, the example below displays the description attribute for every item in the current master dictionary, since description happens to be a valid attribute-defining item:
list md description
Headings, footings, break-on options, and grand-total headings must still be enclosed in quotation marks.
The following examples show typical AQL sentences in which quotation marks are not required. Each of these examples utilizes the y option, that displays a message defining how the pre-processor interprets the sentence.
sort sales by date with date >= 1/1/04 and <= 12/31/04 (y [2393] Assumed '1/1/04' is a value used as selection criteria on attribute 'DATE'. [2393] Assumed '12/31/04' is a value used as selection criteria on attribute 'DATE' sort sales by date with date >= "1/1/04" and <= "12/31/04"
In this example the AQL pre-processor identified one selection clause with two values and then showed the AQL sentence complete with quotation marks.
list orders 1234 1235 (y [2391] Assumed '1234' is an item-ID, or modifies the item-ID. [2391] Assumed '1235' is an item-ID, or modifies the item-ID. list orders '1234' '1235'
In this example the pre-processor correctly identified two item-IDs and then showed the AQL sentence including quotation marks.
sort g/l by-exp balance > 1000.00 (y [2395] '1000.00' is a value used to modify the sort clause on attribute 'BALANCE'. sort g/l by-exp balance > "1000.00"
This example shows that the pre-processor is able to identify that 1000.00 is a value used to modify the by-exp sort clause.
list g/l balance > 1000.00 (y [2392] '1000.00' is a print limiter that modifies 'BALANCE'. list g/l balance > "1000.00"
This example shows the AQL pre-processor identify that the value 1000.00 is a print limiter modifying the output attribute BALANCE. The sentence lists all items but only values greater than 1000.00 are printed for the column BALANCE.
list invoices list dict invoices list only dict invoices sort dict invoices by a2 a1 a2 sort dict invoices with a1 "a]" s]" by ac list-item md = 'list-]' sort-item md = 'list-]' heading "'lc' List items from 'fl'" (p