score:0

select *
from dimensiondata d
where d.width in (@p1, @p2, @p3, ...)
and d.height in (@p4, @p5, @p6, ...)

score:0

exec sp_executesql n'declare @hdoc int;
execute sp_xml_preparedocument @hdoc output, @p0;
with source as
(
  select width, height from openxml(@hdoc, ''/data/row'', 1) with ( width int, height int )
)
select * 
from dimensiondata d
where exists (
   select * 
   from source s
   where d.width = s.width and d.height = s.height
); 
execute sp_xml_removedocument @hdoc;',n'@p0 nvarchar(111)',@p0=n'<data>
  <row width="1" height="1" />
  <row width="2" height="1" />
  <row width="3" height="1" />
</data>'
go

Related Query

More Query from same tag