Join SELECT...

Results 1 to 2 of 2

Thread: Join SELECT...

  1. #1
    Join Date
    Dec 1969

    Default Join SELECT...

    I&#039;m not sure how to do this, but JOIN is what I am thinking. I have this SELECT statement:<BR><BR>sSQL="SELECT DISTINCT EmailAddress, OnlineContact.MemberID, OnlineContact.Name FROM Address JOIN OnlineContact ON Address.AddressID=OnlineContact.AddressId " _<BR> &"JOIN MemberProfile ON OnlineContact.MemberId=MemberProfile.MemberId WHERE EmailAddress LIKE &#039;%@%&#039; ""<BR><BR>which I need to modify. I have a separate table called MemberFamily in which members choose which product families they are interested in. One member may have 1-20 listings in this table. Before I gather email addresses and names with the above SELECT statement, I need to SELECT MemberID FROM MemberFamily WHERE WireFamilyID=Request.Form("WireFamilyID"), so only the proper member&#039;s recieve my search requests.<BR><BR>Can anyone help???<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Join SELECT...

    How about...<BR><BR>sSQL="SELECT DISTINCT EmailAddress, OnlineContact.MemberID, OnlineContact.Name FROM " _<BR>&" Address, OnlineContact, MemberProfile, MemberFamily WHERE Address.AddressID=OnlineContact.AddressId " _<BR>&" AND OnlineContact.MemberId=MemberProfile.MemberId AND EmailAddress LIKE &#039;%@%&#039; AND WireFamilyID="&Request.Form("WireFamilyID")<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts