Home Forums SQL Server 2008 SQL Server 2008 - General Creation of dynamic sql query to create a select statement to pick a unique record RE: Creation of dynamic sql query to create a select statement to pick a unique record
SpringTownDBA
SSCertifiable
Points: 6917
More actions
August 9, 2012 at 11:54 pm
#1524211
You can use a table valued parameter.
... And ( t1.c in (select id from @p2) or not exists (select * from @p2) )