MySQL Forums
Forum List  »  Oracle

Oracle Select Statement to MYSQL
Posted by: Angel Torres Colon
Date: September 12, 2008 01:23PM

Hi to All. I'm trying to convert this Statement to MYSQL but at this moment I'm being unable to perform it. THis is the query

select round(to_number((TO_DATE(SUBSTR(l.REVISIONDATE, 0, 8), 'YYYYMMDD HH24MISS')) - (TO_DATE(SUBSTR(a.ORIGINATEDDATE, 0, 8), 'YYYYMMDD HH24MISS'))),2) as Days_In_PRB, sum(l.quantity) from fw.CAT_PRB a, fw.cat_prb_lot l where l.prrnumber = a.prrnumber and a.ORIGINATEDDATE between ('date1') and ('date2') group by round(to_number((TO_DATE(SUBSTR(l.REVISIONDATE, 0, 8), 'YYYYMMDD HH24MISS')) - (TO_DATE(SUBSTR(a.ORIGINATEDDATE, 0, 8), 'YYYYMMDD HH24MISS'))),2) order by round(to_number((TO_DATE(SUBSTR(l.REVISIONDATE, 0, 8), 'YYYYMMDD HH24MISS')) - (TO_DATE(SUBSTR(a.ORIGINATEDDATE, 0, 8), 'YYYYMMDD HH24MISS'))),2) asc

The problem is when using the functions to_number and to_date. Can anyone help me????

Options: ReplyQuote


Subject
Views
Written By
Posted
Oracle Select Statement to MYSQL
8394
September 12, 2008 01:23PM
5847
September 17, 2008 05:26AM
3632
November 01, 2008 11:26AM


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.