Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    58

    Question Unanswered: Selecting one value rather than both..

    Hi,

    May be a stupid question but i have a small DB built in Access, and one of my fields "Work Place" has TWO "Contacts" associated to it each owning a different "Contact Type".

    What i would like to do is to view all the "Work Places" and their "Contacts" "Contact Types", but

    instead of showing both "Contacts" and their "Types" which are at the same "Work Place", I would like to say that if both "Contacts" and their "Types" are at a particular "Work Place" then still show all of the "Work Places" but Choose one particular "Type" over another, and show one only.

    somebody help, its driving me nuts,

    Ive tried: "type1" OR "type2" in the criteria field but this just displays both..

    Any help would be appreciated.

  2. #2
    Join Date
    Oct 2003
    Posts
    16

    Re: Selecting one value rather than both..

    Originally posted by 130213
    Hi,

    May be a stupid question but i have a small DB built in Access, and one of my fields "Work Place" has TWO "Contacts" associated to it each owning a different "Contact Type".
    Not stupid at all... what you need to do is GROUP BY the workplace and ORDER BY the Contact Type. Something like

    SELECT WorkPlace, ContactName, ContactType
    FROM Contacts
    GROUP BY WorkPlace
    ORDER BY ContactType

    Unless you are doing a join, then you can use other magic

    -Chris
    Read my SQL tutorial at http://www.bitesizeinc.net/index.php/sql.html

Posting Permissions

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