The sql language, Select, Distinct – HP Intelligent Management Center Standard Software Platform User Manual
Page 701: From
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.
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:
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'
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'
FROM
The FROM clause indicates the sources of the database fields specified in
the SELECT clause. FROM lists actual database tables that include the fields
and records containing the requested data. The FROM clause generated by
Crystal Reports precedes the name of each table with the alias it uses to
Crystal Reports 2008 SP3 User's Guide
701
25
Understanding Databases
Using SQL and SQL databases