MySQL Forums
Forum List  »  Oracle

Convert oracle SQL statement to MySQL
Posted by: super sobbie
Date: November 06, 2012 02:54PM

Good day. I am converting an oracle database to a mysql database. One of the scripts that is currently running on the oracle system is as follows:

UPDATE AR_CUST_MASTER a
SET ARCM_SHORT_NAME =
(SELECT ARCM_SHORT_NAME
FROM AR_CUST_MASTER b
WHERE b.ARCM_CUSTOMER_NO =
LPAD (
TO_CHAR (TRUNC (a.ARCM_CUSTOMER_NO / 1000) * 1000),
9,
'0')
AND MOD (b.ARCM_CUSTOMER_NO, 1000) = 0
AND a.ARCM_COMPANY = b.ARCM_COMPANY)
WHERE MOD (a.ARCM_CUSTOMER_NO, 1000) != 0;



I am having issues converting this to mySQL. Any help would be greatly appreciated.

Kind Regards,
supersobbie

Options: ReplyQuote


Subject
Views
Written By
Posted
Convert oracle SQL statement to MySQL
4858
November 06, 2012 02:54PM


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.