Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Puzzle
Message
De
28/11/2003 09:00:32
 
 
À
28/11/2003 08:15:08
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00854130
Message ID:
00854190
Vues:
24
Hi Agnes,

--------
Fabio,

the proble is in (scematic)

From CurA;
inner join CurB on CurA CompareWith CurB;
inner join CurC on CurA CompareWith CurC

Since you join CurC with CurB and the Result with CurA
you may run into problems if you compare at CurC joins ON clause with CurA.
--------

you write this (CurC*CurB)*CurA as righ to left order joining, but without parenthesis not there and an order.

for multiple inner joins :
(CurC*CurB)*CurA == CurC*(CurB*CurA) == (CurA*CurC)*CurB ...

---------
What I have done is to modify the SELECT SQL in a way the the cursors on both "sides" of JOIN are used in the on clause.

I have had problems like that with outer joins and I'm not sure what happens in plain inner joins, but to me it's a good idea to do things in a way that works everywhere.

For me this is not a good choice.

T1 INNER T2 ON condition(T1,T2) WHERE filter(T1,T2)
and
T1 INNER T2 ON condition(T1,T2) AND filter(T1,T2)
are equivalent respect to the set algebra,
but are not semantic equivalent !

For me, the SELECT it must express the semantic request!

For Outer joins set algebra have minor theoremes and invariances,
and associative invariance is not true, and ON have a specific logic.

Have nice weekend also to you.

Fabio
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform