DBD::Pg::st execute failed: ERROR: relation "vc" does not exist Error! SELECT a.id, a.invnumber, a.ordnumber, a.transdate, a.duedate, a.netamount, a.amount, (a.paid) AS paid, a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, a.shippingpoint, e.name AS employee, vc.name, a._id, a.till, m.name AS manager, a.curr, ex.buy AS exchangerate, d.description AS department, a.ponumber FROM ar a JOIN vc ON (a._id = vc.id) LEFT JOIN employee e ON (a.employee_id = e.id) LEFT JOIN employee m ON (e.managerid = m.id) LEFT JOIN exchangerate ex ON (ex.curr = a.curr AND ex.transdate = a.transdate) LEFT JOIN department d ON (a.department_id = d.id) WHERE 1 = 1 AND a.amount != a.paid ORDER BY 4 ASC,2,16 ERROR: relation "vc" does not exist