sql - Filtering of Query not working properly -


i filtering gridview on basis of query database using oracle sql.

my conditions are, if selecting state bihar , status_id = 4. shows me status_id = 4

but shows me other states such maharashtra, punjab. want show bihar state data status_id 4.

below query

select enb.sap_id sap_id,cand.candidateid candidate_id,enb.r4g_state state,enb.site_type site_type,cand.sitename site_name, cand.status candidatestatus ,enb.siteid siteid,enb.priority_site prioritysite,enb.circle circle,      decode (vts.status_name, null, 'fill vendor survey form', vts.status_name) status_name, enb.latitude, enb.longitude, vts.status_id,vt.vsat_detail_id r4g_osp.enodeb enb inner join r4g_osp.candidate cand on enb.sap_id = cand.sap_id left join tbl_vsat_mst_detail vt on enb.sap_id = vt.sap_id left join tbl_vsat_status_mst vts on vt.status_id = vts.status_id enb.scope = 'enodeb-connected_mw' , enb.sitebackhaul = 'mw' , cand.status = 'fill vendor survey form' , upper(state) in  (select regexp_substr(upper('bihar'),'[^,]+', 1, level) rfields dual                                           connect regexp_substr(upper('bihar'), '[^,]+', 1, level) not null) , vt.status_id null or vt.status_id = 4;   

missing brackets.

select enb.sap_id sap_id, cand.candidateid candidate_id, enb.r4g_state state, enb.site_type site_type, cand.sitename site_name, cand.status candidatestatus, enb.siteid siteid, enb.priority_site prioritysite, enb.circle circle,     decode (vts.status_name, null, 'fill vendor survey form', vts.status_name) status_name, enb.latitude,  enb.longitude,  vts.status_id, vt.vsat_detail_id r4g_osp.enodeb enb inner join r4g_osp.candidate cand on enb.sap_id = cand.sap_id left join tbl_vsat_mst_detail vt on enb.sap_id = vt.sap_id left join tbl_vsat_status_mst vts on vt.status_id = vts.status_id enb.scope = 'enodeb-connected_mw' , enb.sitebackhaul = 'mw' , cand.status = 'fill vendor survey form' , (upper(state) in  (select regexp_substr(upper('bihar'),'[^,]+', 1, level) rfields                         dual                        connect regexp_substr(upper('bihar'), '[^,]+', 1, level) not null) , (vt.status_id null or vt.status_id = 4));  

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -