[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why are Project/Timecards joined with persons?



In the 1.2 era, Timecards were connected to Employees. Currently, they
are connected to Persons, resulting in this error:


SELECT j.id, j.description, j.qty, j.allocated,
to_char(j.checkedin, 'HH24:MI') AS checkedin,
to_char(j.checkedout, 'HH24:MI') AS checkedout,
to_char(j.checkedin, 'yyyymmdd') AS transdate,
to_char(j.checkedin, ?) AS transdatea,
to_char(j.checkedin, 'D') AS weekday,
p.partnumber,
pr.projectnumber, pr.description AS projectdescription,
e.employeenumber, e.name AS employee,
to_char(j.checkedin, 'WW') AS workweek, pr.parts_id,
j.sellprice
FROM jcitems j
JOIN parts p ON (p.id = j.parts_id)
JOIN project pr ON (pr.id = j.project_id)
JOIN employee e ON (e.entity_id = j.employee_id)
WHERE 1 = 1 AND j.qty != j.allocated AND pr.parts_id IS NULL
ORDER BY employee, employeenumber, 7 ASC,10
ERROR: column j.employee_id does not exist
LINE 16: JOIN employee e ON (e.entity_id = j.employee_id)
^



Since lsmb-operators are required to be Employee, isn't it logical to
connect timecards to Employee too?


Bye,

Erik.