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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -