Hi All,
I have a dropdownlist box with values (All, Paris, London, New York) -- Cities
Another dropdwonlist box with values (All, Bank of America, City Bank, CIBC) -- Banks
And have a stored procedure that populates the info:
CREATE Procedure Search
(
@.City nvarchar(50),
@.Bank nvarchar(50)
)
AS SELECT * FROM TableA WHERE
city = @.city AND bank= @.bank GO
If user selects a value anything other than "All" in both dropdownbox, everything is OK.
My question is, if user selects "All" in any of these dropdown combobox, how can I seach for all Cities or Banks.
SQL needs to run as a stored procedure. If it was on client end, it would be alot easier.
Any ideas?
Thanks for your help.
Duplicate post, seehttp://forums.asp.net/1138420/ShowPost.aspx
No comments:
Post a Comment