=IIF(Fields!urgency_level.Value = 2 and Fields!DateDifference.Value <=2, Fields!NeedUrgentDates, 1) Errors, but does not give me an error code

  • =IIF(Fields!urgency_level.Value = 2 and Fields!DateDifference.Value <=2, Fields!NeedUrgentDates, 1)

    gives me "Error" on output, but there are no error codes. The syntax checks out and the values for

    fields urgency_level and DateDifference are numeric data.

  • Gillian_Pappas2002 (1/7/2013)


    =IIF(Fields!urgency_level.Value = 2 and Fields!DateDifference.Value <=2, Fields!NeedUrgentDates, 1)

    gives me "Error" on output, but there are no error codes. The syntax checks out and the values for

    fields urgency_level and DateDifference are numeric data.

    obviously it errors with your posted query .. need more info and full query you are trying and I see IIF what is it ? do you mean IF

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • That is the formula that I added to Visual Studio 2008 calculated formula

    =IIF(Fields!urgency_level.Value = 2 and Fields!DateDifference.Value <=2, Fields!NeedUrgentDates, 1)

    Input field Urgency_level can = 1 - 4, and the Field DateDifference can = 0-100, in the above Fx formula

    in Visual Studio I and trying to get the calculated field NeedUrgentDates to be true, if the urgency_level = 2

    and the DateDifference is less than or equal to 2.

    Thanks for your input.

  • IIF() is a microsoft Access construct. That won't work with SQL Server.

    Look into the CASE statement instead.

    The probability of survival is inversely proportional to the angle of arrival.

  • Thanks for your help......I got it to work....

    =IIF(Fields!urgency_level.Value = 2 and Fields!DateDifference.Value <=2 and Fields!KeptAppointments.Value = 1, 1,0)

  • IIF is used in SSRS, while it is not a valid T-SQL construct is is a valid Reporting Services construct

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply