Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 26th, 2004, 07:40 PM
Registered User
Join Date: Aug 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

I have lost my mind on this one.

I have used the inner join successfully on a portion of my site but I've run into a bit of a snag.

Tables & Fields
PropertyInfo - Contains property information
     [u]PropertyID</u>, [u]ContactID</u>, Address, Price.....

ContactInfo - Contains Contact Information which a person could be the contact for more than one property
     [u]ContactID</u>, ContactName, ContactPhone...

PropFeatures - Contains property features which can contain multiple features for each one property
     [u]PropertyID</u>, Feature, FeautreDesc...

I have been able to create the INNER JOIN for PropertyInfo & ContactInfo as shown below.

"SELECT PropertyInfo.PropertyID, PropertyInfo.ContactID, ContactInfo.ContactID, " & _
"PropertyInfo.MLSNo, PropertyInfo.StreetAddress, PropertyInfo.UnitNumber, PropertyInfo.City, PropertyInfo.State, " &_
"ContactInfo.ContactName, ContactInfo.ContactPhone1, ContactInfo.ContactPhone2, ContactInfo.ContactEmail, " & _
" FROM ContactInfo INNER JOIN PropertyInfo ON ContactInfo.ContactID = PropertyInfo.ContactID " & _
"WHERE (PropertyInfo.PropertyID LIKE '" & strPropertyID & "')"

Now I need to add the PropFeatures Table to the Query. When I do, it repeats the Property Information for each Feature in PropFeatures.


Reply With Quote
  #2 (permalink)  
Old August 26th, 2004, 09:25 PM
Friend of Wrox
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post

Well when you join it that is exactly what is suppose to happen. So the question is, what do you want to show from the PropFeatures table?

Reply With Quote
  #3 (permalink)  
Old August 29th, 2004, 09:30 AM
Registered User
Join Date: Aug 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

What I need it to do is to list the property once and the features that belong to that property.

PropID StreetAddress Features
12345 123 Any Street Pool
                            Washer & Dryer
                            Fenced Yard

Reply With Quote
  #4 (permalink)  
Old August 29th, 2004, 12:28 PM
Registered User
Join Date: Aug 2004
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts

Never Mind - I figured it out.

It wasn't the query but where I had the Whild...Wend

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
I'm new to join oneilsteven BOOK: ASP.NET Website Programming Problem-Design-Solution 0 February 9th, 2008 06:07 PM
join dhara_adh SQL Server 2000 2 January 2nd, 2007 12:39 AM
Join or not join madhukp SQL Server 2000 3 February 2nd, 2005 01:11 AM
More than one join jaywhy13 Classic ASP Basics 2 January 31st, 2005 11:38 PM
Oracle 8i inner join and left join problem puteri_84 Oracle 2 August 19th, 2004 07:14 AM

All times are GMT -4. The time now is 06:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.