Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL syntax using join(?)
Can the following be done in a single Select command?
The following will return all shipments (lots) that have encountered a specific event (ie. Picked Up). How can I specify to show all shipments that match event1 but not event2 (ie. Picked Up, but not Delivered)?
***********
event1val = 19432 && id of first eventlevel
event2val = 19412 && id of second event level
select status.date, status.name, ;
status.status_id, status.stats_id, lots.lots_id ;
from lots, status ;
where status.stats_id == event1val ;
and status.lots_id = lots.lots_id
GROUP BY lots_id
into CURSOR showme
************
Thanks very much for any guidance.
David
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement