locked
IIf RRS feed

  • Question

  • Create an update query in design view to update the following fields in the InvB table.

    Update the Status field using an IIf function with the following paralmeters.

    The decision parameter should test to see if Spent is greater than 2000

    The value if true parameter should be "Major"

    Value if false parameter should be an IIf function should test to see if Spent is greater than 1000

    the value if true parameter should be "Mid-Range"

    The value if false parameter should be "Minor"


    • Edited by Jaciii4455 Monday, May 16, 2016 10:50 PM
    Monday, May 16, 2016 10:46 PM

Answers

  • Hi Jaciii4455,

    According to your description, you need to update the status field using IIF function, right?

    You can add a calculated column using the expression below.
    =IIF(Fields!Spent.Value>2000,"Major",IIF(Fields!Spent.Value>1000,"Mid-Range","Minor"))

    Reference
    https://technet.microsoft.com/en-us/library/ms345330%28v=sql.105%29.aspx

    If this is not what you want, please elaborate your requirement so that we can make further analysis.

    Regards,


    Charlie Liao
    TechNet Community Support

    • Proposed as answer by Charlie Liao Friday, June 3, 2016 1:34 PM
    • Marked as answer by Charlie Liao Saturday, June 4, 2016 8:41 AM
    Tuesday, May 17, 2016 1:51 AM