CROSSJOIN Function

OLE DB Programmer's Reference

Consider CROSSJOIN(S1, S2). This can be expanded as follows:

  • Make a table out of the sets S1 and S2.
  • If a set is literal (that is, its members are explicitly enumerated), make this table as shown in the section "Literal Sets."
  • If a set is the result of an expression, look at the section dealing with that expression to see how to get the table.

The following query performs the CROSSJOIN operation:

SELECT S1.*\Rank, S2.*\Rank, Newrank AS Rank FROM (SELECT S1.*\Rank, S2.*\Rank FROM S1, S2) RANK ROWS AS NewRank RANKORDER BY Rank1, Rank2

The notation "S1.*\Rank" means "[All] columns of S1, minus the Rank column."

1998-2001 Microsoft Corporation. All rights reserved.



Microsoft Ole Db 2.0 Programmer's Reference and Data Access SDK
Microsoft OLE DB 2.0 Programmers Reference and Data Access SDK (Microsoft Professional Editions)
ISBN: 0735605904
EAN: 2147483647
Year: 1998
Pages: 1083

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net