Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Posts
    25

    Unanswered: A recordset that returns two columns as one

    Hi,

    I have a contact info table that has two emails columns (email1 & email2). I'd like to return a list of all existing emails, whether it be in email1 or email2.

    Any ideas how I can do this?

    Thanks,

    Michael

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by mvreade
    Any ideas how I can do this?
    use a UNION ALL query, with two SELECTs

    if either can be null, use a WHERE condition in that SELECT

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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