Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2004
    Location
    Sydney Australia
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SQL statement help

    Having toruble doing this in access 2003:

    SELECT......., IIf([Days Opened]>[SLA Agreement],"Yes","No") AS [Has Meet SLA]
    FROM tbleName.....

    Specifically my issue is with:

    IIf([Days Opened]>[SLA Agreement],"Yes","No") AS [Has Meet SLA]

    I am getting an 'out of disk space in temp location error' I know I am not out of disk space. Does it matter if there are no values in some of the 'Days Opened' or 'SLA Agreement' fields? Any assitance getting this working while allowing empty field values would be great. NOTE they are both number data types.

    TYIA
    wind is your friend

  • #2
    New Coder
    Join Date
    Mar 2004
    Location
    Sydney Australia
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I ended up getting this working:

    SWITCH
    (
    [Days Opened] <= TBL_SLA_Activity.[Number of Days] , 'YES',
    [Days Opened] > TBL_SLA_Activity.[Number of Days] , 'NO',
    TRUE, 'N/A'
    ) AS [Has Meet SLA]

    I have this in my query:

    datediff("d",[DateTime],[mmmm.maxdate]) AS [Days Opened]

    I would like to exclude any sat or sun in the date range. Any ideas on this?

    TYIA
    wind is your friend


  •  

    Posting Permissions

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