I have a query in sqlserver that works perfectly well.
It contains case statement which is missing in access and i have read that it
can be suitably work using IIF.
Can some nice soul come ahead help me with coding the following query so that it works in access/
Thanks
Select distinct a.acctid,b.acctid,a.acctname,c.location,c.location id,openingBalance = Convert(Money,SUM(
CASE TransType
WHEN 1 THEN TransAmt
WHEN 0 THEN (TransAmt * -1)
ELSE TransAmt
END) )
From Trans b
inner join accounts a on a.acctid = b.acctid
left join locations c on a.locationid = c.locationid
where 1= 1
group by a.acctid,b.acctid,a.acctname,c.location,c.location id