Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 To: Frank Cazabon
  Where is Frank Cazabon?
 
 Trinidad And Tobago
 Frank Cazabon
 Tags
Subject: RE: Get Effective Rate
Thread ID: 365790 Message ID: 365800 # Views: 51 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Monday, December 31, 2012 2:34:12 PM         
   


> Thanks Cetin,
>
> in the meantime my memory came back and I came up with this:
>
>
SELECT cov_desc, rat_rate, c_CoverageRates.rat_date;
> FROM (SELECT rat_covfk, MAX(rat_date) as rat_date ;
> 		FROM c_CoverageRates ;
> 		WHERE rat_date <= m.ldPeriodEnd;
> 		GROUP BY rat_covfk) rates;
> 	INNER JOIN c_CoverageRates ON rates.rat_covfk = c_CoverageRates.rat_covfk AND rates.rat_date = c_CoverageRates.rat_date;
> 	INNER JOIN c_Coverage ON cov_pk = rates.rat_covfk

>
> You are right about the period and that may cause a problem in the future but for now I'll stick with just the end date.
>
> Do you see any advantage/disadvantage of your solution over mine?
>
> This is actually going to run on a SQL Server database.
>
> Frank.
>
> Frank Cazabon
> Samaan Systems Ltd.
> www.SamaanSystems.com

They are doing the same thing. Mine works with older versions too, that is all. Yours is actually what I did with the period dates inclusion:)



Cetin Basoz

.Net has got better.Think about moving - check my blog:
My Blog
Blog (mirror) - sounds to be down


Support Wikipedia

ENTIRE THREAD

Get Effective Rate Posted by Frank Cazabon @ 12/31/2012 1:39:24 PM
RE: Get Effective Rate Posted by Rahul Moudgill @ 12/31/2012 2:05:34 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 12/31/2012 2:22:14 PM
RE: Get Effective Rate Posted by Cetin Basoz @ 12/31/2012 2:06:32 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 12/31/2012 2:25:31 PM
RE: Get Effective Rate Posted by Cetin Basoz @ 12/31/2012 2:34:12 PM
RE: Get Effective Rate Posted by DEREK DODOO @ 3/28/2013 9:27:48 PM
RE: Get Effective Rate Posted by Cetin Basoz @ 3/28/2013 10:23:52 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 3/29/2013 5:25:49 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 3/29/2013 9:07:35 PM
RE: Get Effective Rate Posted by DEREK DODOO @ 3/30/2013 5:46:55 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 3/30/2013 6:04:36 PM
RE: Get Effective Rate Posted by Anders Altberg @ 12/31/2012 5:30:38 PM
RE: Get Effective Rate Posted by Frank Cazabon @ 12/31/2012 7:15:13 PM