Hello,
I have two tables reghours and work
my reghours table looks something like this
then the work table looks like this
what I am trying to do is:
i tried to to:
this works but I get multiples for my hours
not sure how to tackle thisone. any advice is much appreciated!!!!!!
I have two tables reghours and work
my reghours table looks something like this
Code:
empnum date deptnum hours
1234 1/31/2012 42 8
Code:
empnum dat deptnum itemnum opseq workhours
1234 1/31/2012 42 04562 0011 2
1234 1/31/2012 42 04744 0011 1
1234 1/31/2012 42 04573 0011 5
Code:
empnum dat deptnum itemnum opseq hours workhours
1234 1/31/2012 42 04562 0011 8 2
1234 1/31/2012 42 04744 0011 0 1
1234 1/31/2012 42 04573 0011 0 5
i tried to to:
Code:
select reghours.empnum, reghours.date, reghours.deptnum, work.itemnum, work.opseq, reghours.hours, work.workhours
From reghours left join work on(reghours.empnum = work.empnum) and (reghours.dat = work.dat) and (reghours.dptnum = work.dptnum);
this works but I get multiples for my hours
Code:
empnum dat deptnum itemnum opseq hours workhours
1234 1/31/2012 42 04562 0011 8 2
1234 1/31/2012 42 04744 0011 8 1
1234 1/31/2012 42 04573 0011 8 5
not sure how to tackle thisone. any advice is much appreciated!!!!!!