Hp Intelligent Management Center Standard Software Pl Manual de usuario Pagina 694

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 814
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 693
Not Equal [!=] link
The result set from a Not Equal link includes all records in which the linked
field value in the primary table is not equal to the linked field value in the
lookup table. This type of link can be used to find possible combinations of
items when a table is joined to itself (a self-join). For example, a company
can have a table listing all products they sell. When they decide to hold a
sale where their customers buy one item and get the second item half price,
they may need a list of all possible two item combinations:
SELECT Product1.'Product Name',
Product2.'Product Name',
FROM 'Product' Product1
'Product' Product2
WHERE Product1.'Product Name' !=
Product2.'Product Name'
In this SQL statement, the Product table is opened twice. The first time, it is
given the alias name Product1. The second time, it is given the alias name
Product2. Then the Product Name field is used to link from the Product1
table to the Product2 table. This is the same table, but since it has been
opened twice using different aliases, Crystal Reports considers it two separate
tables. A Not Equal link is used to link the tables by the Product Name field.
As a result, each product is paired with every other product offered, but is
not paired with itself:
Product2Product1
Product NameProduct Name
Xtreme Mtn LockXtreme Adult Helmet
InFlux Lycra GloveXtreme Adult Helmet
Roadster Micro Mtn SaddleXtreme Adult Helmet
694 Crystal Reports 2008 SP3 User's Guide
Understanding Databases
25
Linking tables
Vista de pagina 693
1 2 ... 689 690 691 692 693 694 695 696 697 698 699 ... 813 814

Comentarios a estos manuales

Sin comentarios