I'm trying to convert a query to SQL but I'm having trouble with two calculated fields:
[InvoiceAmount]+IIf(IsNull([InvoiceAmount2]),0,[InvoiceAmount2]) AS InvoiceTotal.
[ItemAmount]+IIf(IsNull([ItemAmount2]),0,[ItemAmount2]) AS ItemTotal
dbo.Jobs.ItemAmount + IIf(ISNULL(dbo.Jobs.ItemAmount2,), 0, dbo.Jobs.ItemAmount2) AS ItemTotal
dbo.Jobs.InvoiceAmount + IIf(ISNULL(dbo.Jobs.InvoiceAmount2,), 0, dbo.Jobs.InvoiceAmount2) AS InvoiceTotal
but it errors near ")"
what would be the correct syntax? I know I need a 0 or a 1 at the end of my isnull statement but the IIF doesn't work either.