Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
View SQL
Message
De
14/08/1998 17:44:01
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
View SQL
Divers
Thread ID:
00127054
Message ID:
00127054
Vues:
51
Ok, I'm stuck. Have two tables parent..child one to many. need to crate a view that has a number of filters on the parent. The child table is a set of timestamped entries. need to create a view of select parent(s)..one lastest timestamped child (not the entire child set). Have tried

SELECT Products.*, Costing.*;
FROM pdsdata!products INNER JOIN pdsdata!costing ;
ON Products.prod_cid = Costing.prod_cid;
WHERE Products.item_stat IN ("Current Line","Prod Development");
AND Products.year = ?vp_year;
AND Products.season = ?vp_season;
GROUP BY Products.item_code;
ORDER BY Costing.datetime DESC

Sometimes I get the last (most recent) datetime costing entry, other parent not. I'm not sure how to proceed with constraining the select to only the one desired costing child row.
Ideas
TIA
Gary
Helping Make Ideas Reality
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform