DERV is a name for a Derived Table, i.e. the previous select in brackets.
In Paradox this syntax didn't exist, but you could do something similar:
"select ... from filename" where filename was a path to a flat file with a select in it.
Using Dervied Tables you can easily nest SQL.
And (a,b) are alias names for the TPS and REL columns. In fact you could do the same by TPS AS a, REL AS b and omit this part.
The rules when and how column aliases are defined are similar to a CREATE VIEW.
Check the "SQL Data Manipulation Language" manual
Chapter 1: The SELECT Statement
Derived Tables
Dieter
↧