Click here to Skip to main content
15,889,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
SELECT P.ProductId , P.ProductName , P.Description ,P.Image , C.CategoryName ,P.IsActive
FROM Product AS P
JOIN
Category AS C
ON
P.CategoryId=C.CategoryId
WHERE (@ProductName IS NULL OR ProductName like '%' + @ProductName + '%')
AND (@CategoryName IS NULL OR CategoryName= @CategoryName)
AND (@IsActive IS NULL OR IsActive=@IsActive)




this is my stored procedure i want null value and textbox values both to be passed in c# for product name ..how to do it..?
Posted
Updated 23-Jul-14 21:49pm
v2
Comments
thatraja 4-Sep-14 3:48am    
Any issue?
Subramanyam Shankar 7-Mar-15 12:08pm    
Can you be more clear as to what exactly is required? All the product names will be passed to c# using this query.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900