sql - nhibernate queryover join temp table -
here sql:
declare @temp table (id uniqueidentifier not null primary key nonclustered, tadate datetime) insert @temp select ta.accountid, max(ta.date) data ta inner join account taac on ta.accountid=taac.id ta.firmid = '7d78f9c2-1604-456a-84f2-4b85cd9da1c4' , ta.date between '2011-09-01' , '2011-09-30' group ta.accountid select ta.* data ta inner join @temp temp on ta.accountid=temp.id , ta.date = temp.tadate;
i want same thing using query over. answer appreciated.
Comments
Post a Comment