Convert Oracle View to MySql
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.