help with this query
Posted by:
sha fendi
Date: March 16, 2019 09:17PM
hello guys..im new to mysql.. i did this query but limit to 0,100 it gives me no problem. The problem when i didnt put limit it gives a very long time to load. i think if i dont put limit it will give me 839k rows. i need all because im doing data migration. Can anyone here help me to improve this query? T_T
SELECT
ac03ordate as entrydate,
ac03copies as quantity,
'MYR' as matawang,
ac03lprice as listprice,
ac05rdate as datereceived,
ac05amt as unitprice,
ac05copy as quantityreceived,
ac05invno AS order_internalnote,
ac03vend AS order_vendornote,
ac05pono AS purchaseordernumber,
ct03docno AS sort1,
fa02fund AS sort2,
ac03cldate AS claimed_date,
case ac03status
when '10' then 'new'
when '14' then 'partial'
when '15' then 'cancelled'
when '20' then 'ordered'
when '28' then 'partial'
when '31' then 'complete'
when '60' then 'ordered'
when '62' then 'complete'
ELSE 'null' END AS orderstatus
FROM acordd
LEFT JOIN acinvo ON ac03order = ac05order
LEFT JOIN ctdocm ON ac03ctrlno = ct03matno
LEFT JOIN fatran ON ac03refno = fa02ref
thank u very much..
Subject
Views
Written By
Posted
help with this query
951
March 16, 2019 09:17PM
544
March 17, 2019 11:04AM
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.