použijte NEBO:
select * from yourTable
where @test = '' OR Agent = @test
if @test přichází s hodnotou null (místo '' ), musíte použít:
select * from yourTable
where @test is null OR Agent = @test
použijte NEBO:
select * from yourTable
where @test = '' OR Agent = @test
if @test přichází s hodnotou null (místo '' ), musíte použít:
select * from yourTable
where @test is null OR Agent = @test