Click here to Skip to main content
16,004,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My SQl is below please help me to convert it in Entity Query-
SQL
select SUM(total)
from MyTax mt1
inner join (
select Code,ID,TaxYear,Data,max(date) as FinalDate
from MyTax
group by Code,ID,TaxYear,Data) mt2
on mt1.Code = mt2.Code and mt1.ID = mt2.ID
and mt1.Data = mt2.Data and mt1.TaxYear = mt2.TaxYear
and mt1.date = mt2.date


Thanks
Posted
Updated 3-Jul-12 7:59am
v2

1 solution

If the query works, why don't you just use it with the ExecuteStoreCommand[^] method?

Hee is a bit more info:Directly Executing Store Commands[^]

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Prasad_Kulkarni 4-Jul-12 0:06am    
My 5!
Espen Harlinn 4-Jul-12 3:53am    
Thank you, Prasad :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900