Was this helpful?
QUEL User Notes for ACCOUNT Example
You cannot use delimited identifiers, schema or owner qualification for table names, or the decimal data type in QUEL queries. Therefore, to create a QUEL version of this report, you have to set up the tables without delimited identifiers as column or table names. The balance column is data type float8 rather than decimal (12,2). You are not able to use owner qualification for the customer table.
An equivalent QUEL query for a similar example would be:
/* ACCOUNT - example of bank statement report. */
.NAME account
.QUERY
        range of t is transact
        range of a is account
        range of c is customer
        retrieve (c.name, c.address, c.city, c.state, c.zip,
            a.acctnum, a.balance, t.transnum, tdate = t.date,
            withdrawal = t.amount * t.type,
                deposit = t.amount * (1 - t.type),
                amt = (t.amount * (1 - t.type)) - (t.amount * t.type))
        where a.acctnum = t.acctnum and c.name = a.name
Last modified date: 04/03/2024