Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding LEFT JOIN
Message
 
 
À
23/08/2005 10:51:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01042886
Message ID:
01042944
Vues:
32
>>These two queries are supposed to be the same. Can you explain the difference between these two? It looks like yours works every time, while the original with IsNull sometimes fails to work. I can not understand it.
>
>Classic error: and ( logical multiplier ) priority!
>
>WHERE  Billing_charges.cbilling_main_fk = ( ?vp_cBilling_main_fk )
>AND Viscodes.ccategory_description LIKE ( "REVENUE_CODES%" )
>OR Viscodes.ccategory_description IS NULL
>* IS
>WHERE ( Billing_charges.cbilling_main_fk = ( ?vp_cBilling_main_fk )
>AND Viscodes.ccategory_description LIKE ( "REVENUE_CODES%" ) )
>OR Viscodes.ccategory_description IS NULL
>* CORRECT is
>WHERE Billing_charges.cbilling_main_fk = ( ?vp_cBilling_main_fk )
>AND (Viscodes.ccategory_description LIKE ( "REVENUE_CODES%" )
>OR Viscodes.ccategory_description IS NULL)
>
>
>But even if it works, this last form is not equivalent to mine;
>the meaning in relational algebra sense it is different!

Well, of course I used the last syntax, e.g. I'm not THAT dump < g >. But I still fail to see the difference, though yours avoid using NULL and therefore more elegant.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform