Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-01-10 : 11:53:42
|
Mitchell writes "Hi Guru
I am sure this question may have been asked already but I cannot seem to find an exact answer to my question after reading many articles.
I have the following situation.
SQL 2000 Database with Two Tables:
Table 1: Firms Table 2: PostCodes
The Firms Table Contains various fields one specifically is "PostCode"
The PostCodes Table Contains a list of South African PostCodes and the City and Suburb Names that they relate to.
What I need to do is the following:
I need to create a search option which has two drop down down boxes.
Drop Down Box 1 will contain a list of Cities (From PostCodes Table), when a user chooses a city it will populate Drop Down Box 2 with the suburb information (From PostCodes Table) for that city and then when the user clicks search it will search (Firms Table) for all the Firms in that area based on postCode matching. So everything comes down to Postcode with this query.
The logic seems simple to me but I just can't crack how to write my query correctly so that it can do this. Logic escapes me at present.
Yes .. I know the drop down boxes is a whole other issue altogether but I think I can figure that one out after not too long but at the moment I am spinning in circles not knowing how to query this properly. Although if you have any ideas for the drop downs as well ... I will always be grateful :))
Anyway ... look forward to any help that you might be able to offer.
Regards Mitch" |
|
|
|
|
|