Viewing 2 posts - 1 through 2 (of 2 total)
Hi Don,
Can you please check below query -
SELECT c.*, h.*
FROM #CONTACT c
INNER JOIN (
SELECT Accountno, ROW_NUMBER() OVER(PARTITION BY accountno ORDER BY lastdate) Rownum ,RECID FROM #History
GROUP BY Accountno,LastDate,RECID)...
October 30, 2012 at 3:38 am
#1554051
Thnks buddies its grt stuff. it just saved my lot of time.
February 11, 2009 at 9:30 pm
#942597