Hi,
I have this query that works great. But now I want to tweek the query so it only shows the records that don't equal.
select a.personnum, a.firstnm,a.lastnm,a.homelaborleveldsc1,a.payperexpectedhrs,
(select SUM(b.WFCTIMEINSECONDS)/3600 as hrs
from vp_alltotals b
where b.personnum = a.personnum
and b.APPLYDATE Between b.prevpayperiodstart AND b.prevpayperiodend
and b.paycodename ='TOT-OBL') as sf_obl, VP_EMPSIGNOFFV42.SIGNOFFSUPERVISOR,
VP_EMPSIGNOFFV42.SUPERVISORFULLNAME
from vp_person a Left Outer Join vp_empsignoffv42 on a.personnum = vp_empsignoffv42.personnum
Where vp_empsignoffv42.employmentstatus = 'Active' and vp_empsignoffv42.signoffenterondtm LIKE current_date
and a.HOMELABORLEVELNAME3 NOT IN ('HRY', 'MONTH', 'TEMP')
ORDER BY VP_EMPSIGNOFFV42.SIGNOFFSUPERVISOR, a.personnum
I would like my results to show me which records from the payperexpectedhrs column do not equal the records from SF_OBL column.
Can anyone tell me what I am missing?
Thanks
Sue
I have this query that works great. But now I want to tweek the query so it only shows the records that don't equal.
select a.personnum, a.firstnm,a.lastnm,a.homelaborleveldsc1,a.payperexpectedhrs,
(select SUM(b.WFCTIMEINSECONDS)/3600 as hrs
from vp_alltotals b
where b.personnum = a.personnum
and b.APPLYDATE Between b.prevpayperiodstart AND b.prevpayperiodend
and b.paycodename ='TOT-OBL') as sf_obl, VP_EMPSIGNOFFV42.SIGNOFFSUPERVISOR,
VP_EMPSIGNOFFV42.SUPERVISORFULLNAME
from vp_person a Left Outer Join vp_empsignoffv42 on a.personnum = vp_empsignoffv42.personnum
Where vp_empsignoffv42.employmentstatus = 'Active' and vp_empsignoffv42.signoffenterondtm LIKE current_date
and a.HOMELABORLEVELNAME3 NOT IN ('HRY', 'MONTH', 'TEMP')
ORDER BY VP_EMPSIGNOFFV42.SIGNOFFSUPERVISOR, a.personnum
I would like my results to show me which records from the payperexpectedhrs column do not equal the records from SF_OBL column.
Can anyone tell me what I am missing?
Thanks
Sue