Greater than [>] link – HP Intelligent Management Center Standard Software Platform User Manual
Page 688
Greater Than [>] link
The result set from a Greater Than link includes all records in which the
linked field value from the primary table is greater than the linked field value
in the lookup table. As an example, a company may want to compare the
salaries made by all their sales representatives to the salaries made by all
their sales managers. The company executives want to make sure no sales
representative is making more money than any manager.
With this in mind, you can link the SalesRep table to the Manager table by
the Salary field in each table using a Greater Than link:
SELECT SalesRep.'Last Name',
SalesRep.'Salary',
Manager.'Last Name',
Manager.'Salary'
FROM 'SalesRep' SalesRep,
'Manager' Manager
WHERE SalesRep.'Salary' >
Manager.'Salary'
This SQL statement might produce data similar to this:
Manager Table
Manager Table
SalesRep Table
SalesRep Table
Salary
Last Name
Salary
Last Name
$32,000.00
Fuller
$35,000.00
Davolio
$30,000.00
Brid
$35,000.00
Davolio
$29,500.00
Buchanan
$35,000.00
Davolio
$45,000.00
Hellstern
$48,300.00
Dodsworth
688
Crystal Reports 2008 SP3 User's Guide
Understanding Databases
25
Linking tables