Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where clause genereates C5 Error
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00800345
Message ID:
00800359
Vues:
21
Hi Leroy,

When you are using AND & OR clause both, then you should put the proper parenthesis to saggregate the two expressions.
What i understand from second paragraph is that you want to fulfill either first 7 conditions or only the 8th condition.
Then please use
***********************
WHERE (Shipping_and_receiving_tickets.company = ?vp_company ;
AND Shipping_and_receiving_tickets.crop_year = ?vp_cropyear ;
AND Shipping_and_receiving_tickets.commodity = ?vp_commodity ;
AND Shipping_and_receiving_tickets.class = ?vp_class ;
AND TTOD(Shipping_and_receiving_tickets.ship_date) = ?vp_date ;
AND SUBSTR(Warehouse.pool, 4, 2) = ?vp_pool ;
AND Shipping_and_receiving_tickets.from_whs = ?vp_warehouse) ;
OR (Shipping_and_receiving_tickets.to_whs = ?vp_warehouse)
***********************

Or, please let us know that which all conditions you want to evaluate.


---
Raj
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform