karmati
asked on
Multiple Filterin with SQL Stored Procedure
Hi,
This is a fire safety community portal in Czech Republic done with ASP.NET in C# and the public will be doing search from the database of fire safety companies.
There is three filtering criteria due to the offering of the companies as: Products, Services and Training. When I am filtering the results, it only filters according to my last selection.
How can I do multiple filtering with MSSQL Stored Procedure so that for example if a visitor searches for a firm that offer products AND services, it is rendered from the database as such. What is the SQL code for such a procedure?
Many Thanks,
This is a fire safety community portal in Czech Republic done with ASP.NET in C# and the public will be doing search from the database of fire safety companies.
There is three filtering criteria due to the offering of the companies as: Products, Services and Training. When I am filtering the results, it only filters according to my last selection.
How can I do multiple filtering with MSSQL Stored Procedure so that for example if a visitor searches for a firm that offer products AND services, it is rendered from the database as such. What is the SQL code for such a procedure?
Many Thanks,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NarrowResults.aspx.cs" Inherits="CreateAccount2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:CheckBoxList ID="CheckBoxList4" runat="server">
<asp:ListItem>Products</asp:ListItem></asp:CheckBoxList>
<br />
<asp:CheckBoxList ID="CheckBoxList5" runat="server">
<asp:ListItem>Services</asp:ListItem></asp:CheckBoxList>
<br />
<asp:CheckBoxList ID="CheckBoxList6" runat="server">
<asp:ListItem>Training</asp:ListItem></asp:CheckBoxList>
</div>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and when calling the above sp posted by tigin44, do not set parameters if the values are ""
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot