Oracle Query Error while using right outer join -


i have converted 1 mysql query oracle , facing following issue while executing.

query:

select oc.channel_id,        oc.oc_calendar_date,        to_number(to_char(oc.oc_calendar_date, 'ww')),        to_char(oc.oc_calendar_date, 'day') day_week,        to_number(to_char(oc.oc_calendar_date, 'ww'), 1) -        to_number(to_char(trunc(sysdate, 'ww')), 1),        (case          when to_number(to_char(oc.oc_calendar_date, 'ww'), 1) =               to_number(to_char(trunc(sysdate, 'ww')), 1)           'current week'          else           ('prev wk ' || (to_number(to_char(oc.oc_calendar_date, 'ww')) -           to_number(to_char(trunc(sysdate, 'ww')))))        end) datediff,        oc.package_id,        orddet.order_completion_date total_count   (select tor.channel_id,                to_date(tor.order_completion_date) order_completion_date,                tol.package_id package_id           tibom.tom_order                tor,                tibom.tom_order_lines          tol,                tibtcare_ppm.tcare_ppm_package tpp          tor.order_id = tol.order_id            , tor.order_type = 'new'            , tor.order_status = 'completed'            , extract(month tor.order_completion_date) >=                extract(month current_date - 6)            , tpp.package_id = tol.package_id) orddet  right outer join (select oc.oc_calendar_date, channel_id, package_id                      hob_reports.ods_calendar       oc,                           tibtcare.tcare_channel_ref     tcr,                           tibtcare_ppm.tcare_ppm_package tpp                     extract(day oc.oc_calender_date) <=                           extract(day current_date)                       , extract(month oc.oc_calendar_date) >=                           extract(month current_date - 6)) oc on (to_date(orddet.order_completion_date) =                                                                       to_date(oc_calendar_date) ,                                                                       oc.channel_id =                                                                       orddet.channel_id ,                                                                       oc.package_id =                                                                       orddet.package_id) 

error:

ora-00904: "oc"."oc_calender_date": invalid identifier 00904. 00000 -  "%s: invalid identifier" *cause:     *action: error @ line: 30 column: 46 


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -