Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View SQL
Message
From
14/08/1998 17:44:01
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
View SQL
Miscellaneous
Thread ID:
00127054
Message ID:
00127054
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform