Viewing 2 posts - 1 through 2 (of 2 total)
Hi, there was a mistake.
HAVING COUNT(T.Id) = @NoOfIds => HAVING COUNT(T2.Id) = @NoOfIds
October 22, 2014 at 4:54 am
#1753992
Hi
If t2 has large volume of data, there would be performance issue on your approach. My approach is below.
USE tempdb;
GO
DECLARE @t TABLE (Id INT);
INSERT INTO @t
VALUES(108)
, (102)
, (103)
, (101);
IF OBJECT_ID('tempdb..#t2')...
October 18, 2014 at 7:24 pm
#1753327