c# - Retrieve data from Multiple table From Ms access -
i make 2 table 1 exp_detail , 2nd exp_head.
exp_detail table contain exp_id,amount_paid,sr_no , exp_description column
exp_head table contain exp_id , exp_name column
now using query retrieve data exp_detail table. display correctly. query
select sr_no, e_date, e_paid, e_des exp_detail e_date = #" + this.dp_expdetail.value.date + "# order exp_detail.sr_no"
but problem retrieve exp_name
using primary key , foreign key exp_head
table in above given query. how possible?
you'll have use sql joins join both tables. refer below updated sql statement join statement, i.e. 3rd line
select sr_no, e_date, e_paid, e_des exp_detail inner join exp_head on exp_detail.exp_id = exp_head.exp_id --this added-- e_date=#" + this.dp_expdetail.value.date + "# order exp_detail.sr_no
Comments
Post a Comment