|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have the query like this.
select a.employee as vvEmpNo, sum(Empvalue) as vvEmpvalue, count(Employee) as vvCount from Employeetable a left join worktable b on a.employee = b.empno group by a.employee order by a.employee Wel i have 200 employees in the EMPLOYEETABLE and 70000 records en the Worktable.. This query hangs on me....i dont know why.. the Worktable looks like this. empno, value, balls, date Emp1, 200, 6, 23/07/2007 EMP1, 4, 1, 17/07/2007 EMP2, 500, 700, 27/07/2007 EMP2, 0, 0, 20/07/2007 EMP2, 234, 212, 22/07/2007 What i want is this There will be 63 fields.1st field the employeeno then the rest the days of the month EMP1, DAY1 TOTVALUE, DAY1 TOTBALLS, DAY2 TOTVALE, DAY@ TOTBALLS [ETC until 31 days] EMP2, DAY1 TOTVALUE, DAY1 TOTBALLS, DAY2 TOTVALE, DAY@ TOTBALLS [ETC until 31 days] Can someone help me please. I have written a procedure to put everything in a 3rd table as well but that takes up to 45 minutes to do. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > Mysql join |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|