Jump to content

mirons

Members
  • Posts

    3
  • Joined

  • Last visited

mirons's Achievements

Newbie

Newbie (1/7)

1

Reputation

  1. mirons

    Type of Joins

    I have a table of residents who may or may not have records in the contacts table. I want to return ALL residents plus only one type of contact. What kind of join would I use?Residents aID First Name Last name1 Brian Jonestown2 John Paul3 Margaret Attwood4 Michael Irons5 Tammy-Lynn Wynette6 Britney SaxonContacts bID ResidentID Contact Type First Name Last Name1 1 1 Bernie Jonestown2 1 2 Keith Moon3 2 2 John Bonham4 4 1 Diane Irons5 4 2 Grace McMillan6 4 3 Bob Dobelina7 6 1 Morgan Anglo8 6 2 Greg NormandyDesired Results (ALL residents and ‘1’ contact types )a.ID a.First Name a.Last name b.First Name b.Last Name1 Brian Jonestown Bernie Jonestown2 John Baptist NULL NULL3 Margaret Attwood NULL NULL4 Michael Irons Diane Irons5 Tammy-Lynn Wynette NULL NULL6 Britney Welsh Morgan Anglo
  2. HiI am querying a table that has values represented by numbers. e.g. Gender is stored as 0 for Female or 1 for Male. I would like to display the results as 'Male' or 'Female' instead of '1' or '0'. Can I do this in my query? There is no reference table.Thanks
×
×
  • Create New...