I have a simple SQL Select command with a calculated column that it is working for years in an Access database. Now passing this same Select to SQL Server does not work.
SELECT Invoice.Date,Invoice.Name,Invoice.Total,.....
and this is the calculated column:
(Invoice.Paid + Invoice.TotalTax * Abs(Invoice.Paid > 0) * Abs(Invoice.PayType <> 'EFP'))"
Explanation: Invoice.TotalTax allways has some positive value, but Invoice.TotalTax must be changed to 0 if Invoice.Paid is 0, or if Invoice.PayType is 'EFP'
Any help to solve this in SQL Server.
SELECT Invoice.Date,Invoice.Name,Invoice.Total,.....
and this is the calculated column:
(Invoice.Paid + Invoice.TotalTax * Abs(Invoice.Paid > 0) * Abs(Invoice.PayType <> 'EFP'))"
Explanation: Invoice.TotalTax allways has some positive value, but Invoice.TotalTax must be changed to 0 if Invoice.Paid is 0, or if Invoice.PayType is 'EFP'
Any help to solve this in SQL Server.