Skip to Content
0
Former Member
Aug 22, 2011 at 12:13 PM

Dispaly of data from query

13 Views

I have two tables,

Table1 : EMployee_details

emp_id

first_name

last_name

Table2: Leaves_list

applicant_id

from_dt

to_dt

TL_id

DPM_id

PM_id

Data:

EMployee_details

101 abc

102 def

103 ghi

104 jkl

Leave_list

101 2011-01-01 2011-01-02 102 103 104

Now, in my report i should display all leave records as,

Applicant_name From date TO date TL Name DPM Name PM Name

abc 2011-01-01 2011-01-02 def ghi jkl

I wrote a query like,

Select concat(e.first_name,' ',e.last_name),l.from_dt,l.to_dt,l.tl_id,l.dpm_id,l.pm_id from employee_details e, leaves_list l where e.emp_id=l.emp_id

I am able to display the Applicant name. But how to display the TL, DPM, PM names in the report?

Can anyone please help me out?

Thank you.