Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2010
    Posts
    1

    Unanswered: Please do my homework

    Hi

    Can you please help me out with this:

    I have a DB like that :

    date_time, tel_number, answered (values are "yes","no"),

    I need a query that checks multiples entries of tel_numbers but shows the tel_number if the answered remained = "no"

    for example if a client called many times and got rejected (answred=no) show me the last time he called (date_time)
    but if he called again (so exists in the table) and he got (answred=yes) don't show it.
    Also I need to view tel_numbers begining with "69"

    date_time, tel_number, answered
    ----------------- ----------- ----------
    1/6/2010 13:00 2104510423 no
    1/6/2010 13:10 6912345678 no
    1/6/2010 13:20 6912345678 no
    1/6/2010 13:25 6912345678 no
    1/6/2010 13:30 6910020030 no
    1/6/2010 13:34 6910020030 yes


    the output I need is:
    date_time, tel_number, answered
    ----------------- ----------- ----------
    1/6/2010 13:25 6912345678 no

    thank you in advance

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I've moved this from the ANSI SQL forum to the Microsoft Access forum and updated the thread title for you.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    Try looking at LIKE and NOT EXISTS.
    Dave

Posting Permissions

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