Posted by kalikoi on 11/03/05 15:53
Hi Jens
Sorry for testing u r patience.
Actually i'm a new bie to sql
i must frame a temp table from a history table
select companyid,latestclosingprice,dailydate into #Tempone from
backscreeningdata3 where dailydate
between '12/3/04' and '01/05/05' order by companyid,dailydate desc
so i get the records for each companyid for a period of 23 days
from these i've calculate returns for each companyid for the entire
period
as
for each companyid for each day
return=(price(previousday)/price(currentday)-1)*100
hope u understand
i'm extremely sorry if i'm troubling u alot
hope u got me
BTW what do u mean by OP
Thanks & Regards
kalyan
here backscreeningdata3 is the history table which is updated daily
since 5 years
so for each day we have 4000-4500 records will be updated each
identified by companyid
Navigation:
[Reply to this message]
|