Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Cetin,
Sorry, still not getting what I need.
Let me rephrase the problem again:
Parent table contains a surrogate key field (cid) which is primary key.
Parent table is 1 rec per inmate.
Child table contains multiple recs per parent. This table also has a surrogate key (cid) which is probably immaterial to this problem.
Child recs have a pointer to the parent table's surrogate key (child.cinmates_id points to parent.cid).
I want:
Select all from parent where child's LATEST (via child's txndatetm) has a value of "OPEN" in child's status field.
Thanks,
John
Précédent
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