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

  • You can use a table valued parameter.

    ... And ( t1.c in (select id from @p2) or not exists (select * from @p2) )