General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only