MySQL Forums
Forum List  »  Newbie

Re: mysql 5.5 to mysql 5.7
Posted by: Barry Galbraith
Date: May 07, 2017 01:30AM

Now run

EXPLAIN SELECT acct_invoice.inv_no AS 'Inv No'
, acct_invoice.inv_to AS 'Parent name'
, acct_invoice.inv_contact AS 'Contact'
, acct_invoice.inv_date AS 'Date'
, SUM(acct_invoice_det.amnt) AS 'Amount'
, acct_invoice.parent_id 
, acct_invoice.inv_adres
, acct_invoice.details
,acct_invoice.acc_yr,
(SELECT SUM(cash_amnt)+SUM(credit_amnt)+ SUM(cheque_amnt) AS total
FROM acct_rv AS rv 
WHERE rv.inv_no=acct_invoice_det.inv_no) AS paid
,(SUM(acct_invoice_det.amnt)-(SELECT SUM(cash_amnt)+SUM(credit_amnt)+ SUM(cheque_amnt) AS total
 FROM acct_rv AS rv WHERE rv.inv_no=acct_invoice_det.inv_no))
 AS balance
 ,acct_invoice.acc_yr
FROM acct_invoice_det
 INNER JOIN acct_invoice 
 ON (acct_invoice_det.inv_no = acct_invoice.inv_no)
 ;
on both systems and post the result here.

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
May 05, 2017 11:19PM
Re: mysql 5.5 to mysql 5.7
May 07, 2017 01:30AM


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.