User`s guide

This SQL query is a representation of the SQL statement that Crystal Reports sends to the SQL server.
By interpreting as much as possible from the report design into an SQL query, Crystal Reports can
off-load much of the report processing onto the server machine. Rather than having to sift through an
entire database to find the data you requested, Crystal Reports lets the server do the sifting and gets
back a much smaller set of data, thus reducing the time and resources your workstation must use in
order to finish the report.
23.2.4 The SQL language
Since Crystal Reports uses the SQL language to access client/server databases through ODBC, you
can better understand the report generating process by understanding some of the SQL clauses
(commands) used:
23.2.4.1 SELECT
The SELECT clause indicates specific data items to retrieve from the database tables. The item retrieved
may be the values in a database field (column), or it may be the result of a calculation performed while
gathering the data. For example:
SELECT
TABLEA.'CUSTNAME',
TABLEA.'STATE'
23.2.4.2 DISTINCT
The DISTINCT clause forces the query to retrieve only unique (distinct) sets of data. When using the
DISTINCT clause, a row of results will be retrieved only once. The previous SELECT statement can
be modified to use the DISTINCT clause:
SELECT DISTINCT
TABLEA.'CUSTNAME',
TABLEA.'STATE'
23.2.4.3 FROM
2012-03-14512
Understanding Databases