Dear all,
I want a query that Return All Records When a Query Parameter Is Blank and when I pass perameter is give me only records for this perameter.
I have done as below but is not working properly.
(When I pass perameter it work fine but When I pass nothing It's give me no records)
SELECT * FROM Table1
where (Product_Sub_Group_Code like '?NameStart' and Product_Sub_Group_Code is not null)
or (Product_Sub_Group_Code is null)
Please any help!
THanks
Vinay
Hi,
There's probably a better way but this works for me: