I was wondering if i could run a LEFT and RIGHT JOIN at the same time. Because i need to run a query that will come up with null values for a few columns when they are supposed to be null at some times, and not null at other times. Here is my code:
SELECT DISTINCT member.Member_ID, company.Company_Name, pm_project.Project_ID, te_period.Date_Start, te_period.Date_End, time_entry.hours_actual, te_charge_code.description
From te_period, time_sheet, pm_project, member, company, time_entry left JOin te_charge_code on time_entry.te_charge_code_recid = te_charge_code.te_charge_code_recid, time_entry as [te] right join te_charge_code as [tecc] on [te].te_charge_code_recid = [tecc].te_charge_code_recid
Where te_period.te_period_recid = time_sheet.te_period_recid and time_sheet.time_sheet_recid = time_entry.time_sheet_recid and company.company_recid = time_entry.company_recid and pm_project.pm_project_recid = time_entry.pm_project_recid and member.member_recid = time_entry.member_recid
I was trying to run a LEFT and RIGHT JOIN. But it did not work completely.
One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.
SELECT DISTINCT member.Member_ID, company.Company_Name, pm_project.Project_ID, te_period.Date_Start, te_period.Date_End, time_entry.hours_actual, te_charge_code.description
From te_period, time_sheet, pm_project, member, company, time_entry left JOin te_charge_code on time_entry.te_charge_code_recid = te_charge_code.te_charge_code_recid, time_entry as [te] right join te_charge_code as [tecc] on [te].te_charge_code_recid = [tecc].te_charge_code_recid
Where te_period.te_period_recid = time_sheet.te_period_recid and time_sheet.time_sheet_recid = time_entry.time_sheet_recid and company.company_recid = time_entry.company_recid and pm_project.pm_project_recid = time_entry.pm_project_recid and member.member_recid = time_entry.member_recid
I was trying to run a LEFT and RIGHT JOIN. But it did not work completely.
One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.