Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006

    Nested IIf query will not work

    I have no idea why this query will not work

    Update CrimesPerday
    SET [Number of Crimes] = [Number of Crimes] +1
    IIf (WeekDay([Start Day])=Weekday([End Day]) and DATEDIFF('y',[start day],[end day])>=7), [CrimesPerDay].DayNum in (1,2,3,4,5,6,7), IIf WeekDay([StartDay]) > Weekday([End Day]), [CrimesPerday].DayNum between Weekday([Start Day]) and (7) or
    [CrimesPerDay] between (1) and Weekday([End Day]), [CrimesPerDay].DayNum between weekday([Start Day]) and weekday([End Day]);

    Any help would be greatly appreciated.

    Thank you

  2. #2
    Join Date
    Dec 2005
    Wilmington, DE - USA
    Try stating in sentences what you want to happen, and then we can work on building the SQL logic.

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

Similar Threads

  1. Nested Joins
    By zephaneas in forum Programming
    Replies: 0
    Last Post: 11-10-2008, 11:49 AM
  2. Concatenation, nested IIF functions
    By krymer in forum Queries
    Replies: 2
    Last Post: 10-20-2008, 07:27 AM
  3. Replies: 0
    Last Post: 05-17-2008, 01:18 AM
  4. Can't get TransferSpreadsheet to work
    By Valeda in forum Import/Export Data
    Replies: 0
    Last Post: 07-19-2007, 08:04 AM
  5. Replies: 1
    Last Post: 01-10-2006, 12:32 PM

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