I hope someone can help?
I have two tables (Workorder and labtrans)
Labtrans stores multiple entries of labor entries per workorder. I have found an error in the database with respect to costing. I need to look at the ACTLABCOST of workorder and compare it with that of the summation of linecosts of the labtrans table. I want to be able to look at those that are the same first. Note that the wonum in each table is the link, so they have to be equal.
SQL> edit
Wrote file afiedt.buf
1 select a.wonum
2 from workorder a
3* where a.ACTLABCOST = (select sum(labtrans.linecost) from labtrans group by labtrans.wonum where labtrans.wonum = a.wonum)
SQL> /
where a.ACTLABCOST = (select sum(labtrans.linecost) from labtrans group by labtrans.wonum where labtrans.wonum = a.wonum)
*
ERROR at line 3:
ORA-00907: missing right parenthesis
I have two tables (Workorder and labtrans)
Labtrans stores multiple entries of labor entries per workorder. I have found an error in the database with respect to costing. I need to look at the ACTLABCOST of workorder and compare it with that of the summation of linecosts of the labtrans table. I want to be able to look at those that are the same first. Note that the wonum in each table is the link, so they have to be equal.
SQL> edit
Wrote file afiedt.buf
1 select a.wonum
2 from workorder a
3* where a.ACTLABCOST = (select sum(labtrans.linecost) from labtrans group by labtrans.wonum where labtrans.wonum = a.wonum)
SQL> /
where a.ACTLABCOST = (select sum(labtrans.linecost) from labtrans group by labtrans.wonum where labtrans.wonum = a.wonum)
*
ERROR at line 3:
ORA-00907: missing right parenthesis