# Quotation marks

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 &#39;100&#39;&#39;101&#39;&#39;102&#39;
```
Spaces between item-IDs are optional. Both item-ID strings
and value strings may be included in an AQL sentence:

```
list customers &#39;100&#39;&#39;101&#39;&#39;102&#39; with contact = "[barney]"
```
The previous example shows when D3 enforces the rules about single quotation marks surrounding
 item-IDs and double quotation marks surrounding value strings.

The backslash character can 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 &#39;description&#39;
```
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.

## Example(s)

The following examples show typical AQL sentences in which
 quotation marks are not required. Each of these examples uses the y option,
 which displays a message defining how the pre-processor interprets the
 sentence.

**Example 1**

```
sort sales by date with date >= 1/1/04 and <= 12/31/04 (y

[2393] Assumed &#39;1/1/04&#39; is a value used as selection criteria on attribute &#39;DATE&#39;.

[2393] Assumed &#39;12/31/04&#39; is a value used as selection criteria on attribute &#39;DATE&#39;

sort sales by date with date >= "1/1/04" and <= "12/31/04"
```
**Example 2**

This example shows 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 &#39;1234&#39; is an item-ID, or modifies the item-ID.

[2391] Assumed &#39;1235&#39; is an item-ID, or modifies the item-ID.

list orders &#39;1234&#39; &#39;1235&#39;
```
**Example 3**

This example shows 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] &#39;1000.00&#39; is a value used to modify the sort clause on attribute &#39;BALANCE&#39;.

sort g/l by-exp balance > "1000.00"
```
**Example 4**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] &#39;1000.00&#39; is a print limiter that modifies &#39;BALANCE&#39;.

list g/l balance > "1000.00"
```
**Example 5**

This example shows the AQL pre-processor identified 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`.

Note:
 `BALANCE` is an output attribute. If the word with is included
 in this sentence, then `BALANCE > 1000.00` becomes a selection criterion.

```
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 = &#39;list-]&#39;
sort-item md = &#39;list-]&#39; heading "&#39;lc&#39; List items from &#39;fl&#39;" (p
```

---
Source: https://d3codex.com/access/quotation-marks/ - part of the D3Codex reference.
