473,397 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Help with search query

Two questions related to SQL searches (ideally everything will be in a
stored procedure):

I have an ASP.NET checkboxlist on a search page (this is a search of
properties for sale). The checkboxlist is responsible for displaying the
available amenities in a home (air conditioning, patio, garage, etc.). I
have a table tblAmenities with columns amenity_id and amenity_name. Another
table tblProperties with columns property_id, property_address, etc. Then a
lookup table that uses the property_id and amenity_id to associate amenities
with various properties.

My question is, when the user selects various checkboxes from this list
(whose values correspond to the amenity_id of the particular amenity they
chose), how do I structure the SQL statement to do the search?

Along with this question is how do I rate the results of my search by a
percentage match (among all of my search fields, including the amenities).
For example, with two identical houses, with the exception that one has 20
of their selected amenities, and the other only has 1, the one with 20
should be displayed first, along with an indicator: Percentage Match: x%.

Thanks,

Scott
Nov 18 '05 #1
1 1033
>>Two questions related to SQL searches
One answer for every questions related to SQL searches

http://www.sommarskog.se/dyn-search.html

--
Roji. P. Thomas
Net Asset Management
https://www.netassetmanagement.com
"Scott Schluer" <us****@webservicesinc.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Two questions related to SQL searches (ideally everything will be in a
stored procedure):

I have an ASP.NET checkboxlist on a search page (this is a search of
properties for sale). The checkboxlist is responsible for displaying the
available amenities in a home (air conditioning, patio, garage, etc.). I
have a table tblAmenities with columns amenity_id and amenity_name. Another table tblProperties with columns property_id, property_address, etc. Then a lookup table that uses the property_id and amenity_id to associate amenities with various properties.

My question is, when the user selects various checkboxes from this list
(whose values correspond to the amenity_id of the particular amenity they
chose), how do I structure the SQL statement to do the search?

Along with this question is how do I rate the results of my search by a
percentage match (among all of my search fields, including the amenities).
For example, with two identical houses, with the exception that one has 20
of their selected amenities, and the other only has 1, the one with 20
should be displayed first, along with an indicator: Percentage Match: x%.

Thanks,

Scott

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Melissa Kay Beeline | last post by:
OK, here's the sitch : we have an access control system at work that registers ever entry/exit of every employee. I recently made some queries in Access so the ppl in HR could make reports (who...
17
by: OdAwG | last post by:
Just some questions regarding tables. I am new Access Database and need a little help. I have the following data listed below 01. I have a table called tbl_Customer with the following...
3
by: cuties | last post by:
Hi all.... i'm very new to this programming language. i'm required to fulfill this task in the company i'm doing my practical. i hope i can get guide for my problem... Here is the script i...
3
by: pbd22 | last post by:
Hi. I need some help with structuring my query strings. I have a form with a search bar and some links. Each link is a search type (such as "community"). The HREF for the link's anchor looks...
8
by: Sham | last post by:
I am trying to perform the following query on a table that has been indexed using Full Text Search. The table contains multiple columns than have been indexed. (Below, all xml columns are...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.