Select
Sum([LLR Data].Miles) AS Ttl_Miles, Sum([LLR Data].[Direct Weight]) AS Ttl_Weight,
IIF([LLR Data].[Direct Weight] > 0,[LLR Data].[Miles],0)
where [LLR Data].[Commodity] = 'RETL'
Why can't I use the iff in the select I need to capture the miles depending on the field
Sum([LLR Data].Miles) AS Ttl_Miles, Sum([LLR Data].[Direct Weight]) AS Ttl_Weight,
IIF([LLR Data].[Direct Weight] > 0,[LLR Data].[Miles],0)
where [LLR Data].[Commodity] = 'RETL'
Why can't I use the iff in the select I need to capture the miles depending on the field