User-938890548 posted
think i've found the answer :
Select isnull(a.surname,b.surname), aCnt, bCnt
From (Select surname, aCnt = count(*) From tbl1 Group By surname) A
Full Join (Select surname, bCnt = count(*) From tbl2 Group By surname) B
On A.surname = B.surname
Where isnull(aCnt,0) <> isnull(bCnt,0)
------------
I have saved this as a view and can reference this view like so:
SELECT Expr1
FROM vw.MYVIEW_Count
WHERE (bCnt > aCnt)
But I'm not sure how to incorporate this code:
WHERE (bCnt > aCnt)
into the above code - rather than referencing the view (display it all in 1 go)?