Hi all,
I am having trouble getting an outer join to work. I have a working procedure that generates the following SQL statement and returns the results. It lists matching items from the 'Pointer' table. I need to modify it to return all items from the UserFavorite.ReportID, even if there is not a match. Does anyone have any suggestions??? I've tried a everything I can think of but keep getting "The table 'Pointer' is an inner member of an outer-join clause. This is not allowed if the table also participates in a regular join clause."
SELECT
User.UserID,
UserFavorite.ReportID,
UserWare.WarehouseID,
UserDept.DepartmentID,
Pointer.ymd,
Pointer.Fname,
Department.Path,
Report.Description,
Report.ReportCount
FROM
User,
UserWare,
UserDept,
UserFavorite,
Pointer,
Department,
Report
WHERE
User.UserID = 'anyUserID' AND
Pointer.ymd = 20010723 AND
UserWare.UserID = User.UserID AND
UserDept.UserID = User.UserID AND
UserFavorite.UserID = User.UserID AND
UserWare.WarehouseID = Pointer.WarehouseID AND
UserDept.DepartmentID = Pointer.DepartmentID AND
UserFavorite.ReportID = Pointer.ReportID AND
Department.DepartmentID = Pointer.DepartmentID AND
Report.ReportID = Pointer.ReportID
I am having trouble getting an outer join to work. I have a working procedure that generates the following SQL statement and returns the results. It lists matching items from the 'Pointer' table. I need to modify it to return all items from the UserFavorite.ReportID, even if there is not a match. Does anyone have any suggestions??? I've tried a everything I can think of but keep getting "The table 'Pointer' is an inner member of an outer-join clause. This is not allowed if the table also participates in a regular join clause."
SELECT
User.UserID,
UserFavorite.ReportID,
UserWare.WarehouseID,
UserDept.DepartmentID,
Pointer.ymd,
Pointer.Fname,
Department.Path,
Report.Description,
Report.ReportCount
FROM
User,
UserWare,
UserDept,
UserFavorite,
Pointer,
Department,
Report
WHERE
User.UserID = 'anyUserID' AND
Pointer.ymd = 20010723 AND
UserWare.UserID = User.UserID AND
UserDept.UserID = User.UserID AND
UserFavorite.UserID = User.UserID AND
UserWare.WarehouseID = Pointer.WarehouseID AND
UserDept.DepartmentID = Pointer.DepartmentID AND
UserFavorite.ReportID = Pointer.ReportID AND
Department.DepartmentID = Pointer.DepartmentID AND
Report.ReportID = Pointer.ReportID