SQL Problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew

    #1

    SQL Problem

    I have a table called Members (200 entries - member ID ) and one called
    Photos (50 entries - Photo ID, Images)

    How do I display all 200 members and the corresponding 50 entries so I get
    something like below

    I have tried the query but all I get it the 50 members with photos

    1
    2 - PhotoID
    3
    4
    5 - PhotoID
    6
    7 - PhotoID
    8
    9
    10



  • Rick Brandt

    #2
    Re: SQL Problem

    "Andrew" <andrew@nospam. com> wrote in message
    news:VxHuc.220$ cN.147@newsfe2-win...[color=blue]
    > I have a table called Members (200 entries - member ID ) and one called
    > Photos (50 entries - Photo ID, Images)
    >
    > How do I display all 200 members and the corresponding 50 entries so I get
    > something like below
    >
    > I have tried the query but all I get it the 50 members with photos[/color]

    Double-Click the join line in your query. You will see that there are three
    types of join and you are currently using the top choice (an inner join). One
    of the other two will give you what you want.


    --
    I don't check the Email account attached
    to this message. Send instead to...
    RBrandt at Hunter dot com


    Comment

    • Yannick Turgeon

      #3
      Re: SQL Problem

      You have to do a LEFT or RIGHT join. To do this, just double-click on the
      joint between your two tables, and select the choice wich looks like:
      "Include all rows frem Members and only those from Photos ..."

      HTH

      Yannick

      "Andrew" <andrew@nospam. com> wrote in message
      news:VxHuc.220$ cN.147@newsfe2-win...[color=blue]
      > I have a table called Members (200 entries - member ID ) and one called
      > Photos (50 entries - Photo ID, Images)
      >
      > How do I display all 200 members and the corresponding 50 entries so I get
      > something like below
      >
      > I have tried the query but all I get it the 50 members with photos
      >
      > 1
      > 2 - PhotoID
      > 3
      > 4
      > 5 - PhotoID
      > 6
      > 7 - PhotoID
      > 8
      > 9
      > 10
      >
      >
      >[/color]


      Comment

      Working...