sql - Display grid on basis of Enquiry No -
the below query displays me result want show in grid.
select bb.project_id, bb.building_id, bb.flat_id flat_id, cc.cust_enq_no enquiry_no, cc.name enquiry_name, to_char (cc.f_followup_date, 'dd/mm/yyyy') last_followup_date, cc.f_remarks last_followup_comments xxacl_pn_flat_det_v bb inner join xxcus.xxacl_pn_customer_enquiry_v cc on bb.project_id = cc.mkey
but there change in requirement.
now each f_flat_id
there multiple cust_enq_no
say
select * xxcus.xxacl_pn_customer_enquiry_v f_flat_id = '18158'
it has 3 records.
so first query,
how multiple cust_enq_no
update
i want filter , display in grid
protected void displaygridenquiry() { oraclecommand cmd1 = new oraclecommand("select bb.project_id, bb.building_id, bb.flat_id flat_id, cc.cust_enq_no enquiry_no, " + "cc.name enquiry_name, to_char (cc.f_followup_date,'dd/mm/yyyy') last_followup_date, cc.f_remarks last_followup_comments " + "from xxacl_pn_flat_det_v bb inner join xxcus.xxacl_pn_customer_enquiry_v cc " + "on bb.project_id = cc.mkey", objpricon); datatable dtfillgrid1 = new datatable(); oracledataadapter da1 = new oracledataadapter(cmd1); da1.fill(dtfillgrid1); dataview dview1 = new dataview(dtfillgrid1); dview1.rowfilter = "project_id = '" + ddlproject.selectedvalue + "' , building_id = '" + ddlbuilding.selectedvalue + "' , flat_id = '" + ddlunit.selecteditem.text + "'"; gridenquiry.datasource = dview1.totable(); gridenquiry.databind(); }
select bb.project_id, bb.building_id, bb.flat_id flat_id, cc.cust_enq_no enquiry_no, cc.name enquiry_name, to_char (cc.f_followup_date, 'dd/mm/yyyy') last_followup_date, cc.f_remarks last_followup_comments xxacl_pn_flat_det_v bb left join xxcus.xxacl_pn_customer_enquiry_v cc on bb.flat_id=cc.f_flat_id
Comments
Post a Comment