MySQL Forums
Forum List  »  Newbie

Help with calcluated columns
Posted by: Evan Stockdale
Date: February 01, 2016 12:05PM

Hi all,

I'm very new to MySQL.

I'm working on converting MS Access queries to MySQL. So far, I've been having good luck with it but I'm running into trouble with converting the below listed calculated columns in Access to MySQL:

1) IIf(sumofpacking Is Null,Bags,Bags-sumofpacking) AS Bags_Undelivered

2) DateDiff('m', DELVPERIOD_TO, Date()) AS Months_Late

3) Round((0.025*Lbs Undelivered*Months Late),2) AS Store_Fin_Charges


I tried converting the IIf statement to a Case statement in MySQL but no luck.

CASE SumOfPACKING
WHEN SumOfPACKING ISNULL THEN Bags
ELSE Bags-SumOfPACKING
END AS BAGS_UNDELIVERED

Any help is appreciated.

Options: ReplyQuote


Subject
Written By
Posted
Help with calcluated columns
February 01, 2016 12:05PM
February 01, 2016 02:25PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.