Use of If Else

  • Can you use a IF Else statment in aggregate function such as

    Round(Sum((rcitem.fqtyrecv - If is null dt.qtyfail O else dt.qtyfail end) * rcitem.fucost), 0) as PartCostTot

    Or how might I preform such a test?

    Thanks in advance!

  • Try the case statement

    rount(SUm((rcitem.fqtrecv- case when dt.qtyfail is null then 0 else dt.qtyfail end) * rcitem.fucost),0)

    Not tested

  • Worked pefect, Thanks!

Viewing 3 posts - 1 through 2 (of 2 total)

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