Reputation: 21
The multi-part identifier "Reporting_Information.Id_Department_Description" could not be bound.
Select
Basic_Information.Company_No, Basic_Information.Company_Name, Basic_Information.Employee_Code,
Basic_Information.Surname + ' ' + Basic_Information.Initials AS Employee_Name,
Employee_Exceptions.Date,
Employee_Exceptions.Day , Employee_Exceptions.Time , Employee_Exceptions.Exception,Employee_Exceptions.Exception_Status,
Company_Information.Trading_Or_Other_Name,Company_Information.Address_Line_1,
Company_Information.Address_Line_2,Company_Information.Address_Line_3,
Company_Information.Address_Line_Postal_Code,Company_Information.Period_Start_Date,Department_Descriptions.Short_Description ,
Company_Information.Period_End_Date,(CASE Company_Information.Payment_Period
WHEN 'M' THEN 'Monthly (12)'
WHEN 'B' THEN 'Bi-Weekly (26)'
WHEN 'W' THEN 'Weekly (52)'END) as Payment_Period
from Employee_Exceptions
RIGHT OUTER JOIN Basic_Information
ON ( Employee_Exceptions.Id_Basic_Information = Basic_Information.Id_Basic_Information)
LEFT OUTER JOIN Company_Information
ON ( Company_Information.Id_Company = Basic_Information.Id_Company)
LEFT OUTER JOIN Department_Descriptions
ON (Id_Department_Description = Reporting_Information.Id_Department_Description)
Please help
Upvotes: 1
Views: 125
Reputation: 21
Ok Guys i won i just needed to add an extra Join there,
Select Basic_Information.Company_No, Basic_Information.Company_Name , Basic_Information.Employee_Code ,
Basic_Information.Surname + ' ' + Basic_Information.Initials AS Employee_Name , Employee_Exceptions.Date ,
Employee_Exceptions.Day , Employee_Exceptions.Time , Employee_Exceptions.Exception,Employee_Exceptions.Exception_Status,
Company_Information.Trading_Or_Other_Name,Company_Information.Address_Line_1,
Company_Information.Address_Line_2,Company_Information.Address_Line_3,
Company_Information.Address_Line_Postal_Code,Company_Information.Period_Start_Date,Department_Descriptions.Short_Description ,
Company_Information.Period_End_Date,(CASE Company_Information.Payment_Period
WHEN 'M' THEN 'Monthly (12)'
WHEN 'B' THEN 'Bi-Weekly (26)'
WHEN 'W' THEN 'Weekly (52)'END) as Payment_Period
from Employee_Exceptions
RIGHT OUTER JOIN Basic_Information
ON ( Employee_Exceptions.Id_Basic_Information = Basic_Information.Id_Basic_Information)
---Added Join
LEFT OUTER JOIN Company_Information
LEFT OUTER JOIN Reporting_Information ON (Reporting_Information.Id_Basic_Information = Basic_Information.Id_Basic_Information) LEFT OUTER JOIN Department_Descriptions ON (Department_Descriptions.Id_Department_Description = Reporting_Information.Id_Department_Description)
Upvotes: 1