Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
declare @id varchar(max)
set @id = '1, 2, 3, 4, 5'
select *
from table1
where @id is null
Union All
select *
from table1
Inner Join split_fun(@id) As SplitValue
On SplitValue.Id = table1.id
declare @id varchar(max), @name varchar(max)
set @id = '1, 2, 3, 4, 5'
set @name = 'Washington, Jefferson, Lincoln'
; With SelectedIds As
(
select PrimaryKeyColumn
from table1
where @id is null
Union
select PrimaryKeyColumn
from table1
Inner Join split_fun(@id) As SplitValue
On SplitValue.Id = table1.id
Union
Select PrimaryKeyColumn
From table1
where @name is null
Union
Select PrimaryKeyColumn
From table1
Inner Join split_fun(@Name) As Names
On Names.Name = table1.Name
)
Select Table1.*
From Table1
Inner Join SelectedIds
On Table1.Id = SelectedIds.Id