Results 1 to 2 of 2
  1. #1
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40

    Query Question - Update Where [something] = 2 possible things

    Hi everyone!
    Easy question, but it's tripped me up a bit, I'm sure most everyone knows how to do this, I must have a brain block today.
    I have a simple query that is updating a field with text, if the day of the week is on a weekend. I can get it to work if I add just ONE day, but I want it to work if it is either of saturday or sunday. Here's what I got...
    (call_on_weekend) is a field I'm just updating the text to, and (date_of_call) is a date field I need to know if it occurred on a weekend:

    UPDATE Raw SET Raw.call_on_weekend = "Call on Weekend, "


    WHERE format([date_of_call],"ddd")="Sun";

    If I put: ="Sun" or "Sat"; at the end, it does not work. and it won't let me use: =In(Sat,Sun) which would be my preference/experience. So how do I make that last WHERE command pick both saturday and sunday? Thanks in advance for the help!

    Mikel

  2. #2
    SealM is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Aug 2012
    Posts
    40
    Wow, I let design view in Access take care of it, and it solved it for me. Here's what it pumped out in SQL:

    UPDATE Raw SET Raw.call_on_weekend = "Call on Weekend, "
    WHERE (((Format([date_of_call],"ddd"))="Sun" Or (Format([date_of_call],"ddd"))="Sat"));

    Who woulda though! LOL. Ah well...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help on many things
    By scarruth2 in forum Access
    Replies: 11
    Last Post: 09-04-2012, 06:27 PM
  2. Replies: 1
    Last Post: 07-01-2012, 09:55 AM
  3. Update Query Question
    By Profector in forum Queries
    Replies: 2
    Last Post: 10-13-2010, 09:24 AM
  4. Update Query Which Asks Question
    By jhillbrown in forum Access
    Replies: 3
    Last Post: 02-15-2010, 06:36 AM
  5. update query question
    By blusk06 in forum Queries
    Replies: 3
    Last Post: 05-30-2008, 05:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums