Riddhi Valecha

Riddhi Valecha

  • 442
  • 3.3k
  • 411.6k

SQL Query - Select Records from multiple tables and fetch data

Jun 16 2021 12:27 PM

Dear Team,

I have 3 tables as below - (Candidate ID column is unique and is used as foreign key)

1.

2.

Table - TBLEducationDetails              
ID CandidateID Type Degree Year Institute Subject Marks
1 101A Full Time MBA+IT 2011 IIT Bombay Management,Computers 60%
2 101A Full Time 12th 2010 Mumbai HSBC 76%
3 102B Part Time M.COM+IT 2012 IIT Madras Management,Computers 65%
4 102B Full Time 12th 2010 Mumbai HSBC 68%
5 103C Distance Learning MBA 2011 IIT Kanpur Management,Computers 70%

3.

Table - TBLCurrentOrganizationDetails            
ID CandidateID Org Name From Date ToDate Job  Location
1 101A ABC Pvt Ltd 01-01-2013 01-01-2015 Java Developer Mumbai
2 102B PQR Pvt Ltd 02-01-2013 02-01-2015 Oracle Chennai
3 103C GHI Pvt Ltd 03-01-2013 03-01-2015 Manager Kolkata
4 103C JKL Pvt Ltd 03-01-2015 03-01-2016 Sr. Manager Kolkata

Now, I want to fetch all the data of all the candidates in the below format -

How do I get this report form in SQL Query?

Or Is there any other way to get data and display it in grid view?

Please help in this....


Answers (3)