Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Max date
Message
 
To
11/01/2006 20:44:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01085916
Message ID:
01087630
Views:
4
Select policy,exp_mod,max(eff_date) from table exp_mod_table ;
group by policy,exp_mod into cursor xxx


Try this:

SELECT policy, max( eff_date ) as eff_date FROM table exp_mod_table GROUP BY policy INTO CURSOR xxx

SELECT e.policy, e.exp_mod, e.eff_date FROM exp_mod_table e INNER JOIN xxx ON xxx.policy = e.policy and xxx.effdate = e.eff_date INTO CURSOR yyy
Previous
Reply
Map
View

Click here to load this message in the networking platform