I have created a stored procedure for search.
This is the stored procedure code:
ALTER procedure [OS].[GET_ItemsRecords]
@itemID varchar (10) = NULL,
@itemName varchar (100) = NULL
select * from OS.Items where
itemID = @itemID AND
itemName = @itemName;
I try to search using the itemID and it does not shows anything. The database only retrive the records when I enter in the item id and item name. How do i modify the search sql such that when I search for either the item id or item name, it displays the records. Also, if I enter the matching ID and Name, record will be displayed, else it will not be displayed. Thanks.