MySQL Forums
Forum List  »  Oracle

Convert Oracle View to MySql
Posted by: pravin vaidya
Date: August 18, 2009 04:20AM

Dear Firends...
I m new to MySql pls help to convert this view to MySql
The oracle View as below..

CREATE OR REPLACE VIEW VW_BASE_STATION_V21
(R_RADIO, BASE)
AS
SELECT r_radio, 'Y' base
FROM rec_now
WHERE headding = 'Y'
AND TRUNC (r_time) = TRUNC (SYSDATE)
AND r_radio NOT IN (
SELECT r_radio
FROM (SELECT COUNT (1) c, group_main, GROUP_ID, r_radio
FROM (SELECT o.group_main, o.GROUP_ID, r.r_radio,
e.r_station
FROM m_group o,
m_vehicle v,
r_datatemp e,
rec_now r
WHERE v.radio_id = r.r_radio
AND r.r_radio = e.r_radio(+)
AND o.GROUP_ID = v.GROUP_ID
AND v.under_repair = 'N'
AND v.rec_stat = 'Y'
AND r.headding = 'Y'
AND TRUNC (r.r_time) = TRUNC (SYSDATE)
GROUP BY o.group_main,
o.GROUP_ID,
r.r_radio,
e.r_station)
GROUP BY group_main, GROUP_ID, r_radio)
WHERE c = 1)
/



Edited 1 time(s). Last edit at 08/19/2009 12:51AM by pravin vaidya.

Options: ReplyQuote


Subject
Views
Written By
Posted
Convert Oracle View to MySql
6129
August 18, 2009 04:20AM
3059
August 23, 2009 05:28PM


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.