0

7I have a table named "Critères"

Critères have two columns:

"Prestation / Code hors projet" - "Heures"

Salut                    20
Salut                    42
Salut                    35
Coco                     152
Coco                     -52
Lolilol                  89

I just need to have this result IN THE SAME TABLE:

"Prestation / Code hors projet" - "Heures"

Salut                    97
Coco                     100
Lolilol                  89

Is this clear ?

Please I really need help

I have this query for the moment: "SELECT Prestation / Code hors projet, SUM(Heures) FROM Critères GROUP BY Prestation / Code hors projet"

The problem is that I don't know what to do with the results =/

Regards,

Noude
  • 57
  • 6
  • What do you mean by *need it in the same table*? – juergen d Jul 29 '13 at 10:28
  • What do you mean: *I don't know what to do with the results*? Surely you do whatever you need to with them? – BenM Jul 29 '13 at 10:37
  • Should the sum of `Salut` not be 97? – Mark Jul 29 '13 at 11:02
  • You can do it in one query. Is it a need to seperate in two queries? – Kuzgun Jul 29 '13 at 11:02
  • I've putted 77 due to a problem when I wrote it, fixed now (even if we just don't care...) In fact I need to do the query on the table "Critères" (with all the 1st values) and after I truncate all the table to put the results in. So I just have the results in. Is that clear now ? :) If I can do it in only one query it's really cool ! Yes ! :p – Noude Jul 29 '13 at 11:46
  • So in the first part I have: "Prestation / Code hors projet" - "Heures" Salut 20 Salut 42 Salut 35 Coco 152 Coco -52 Lolilol 89 And I want to have (and ONLY this): "Prestation / Code hors projet" - "Heures" Salut 97 Coco 100 Lolilol 89 =) – Noude Jul 29 '13 at 11:49

0 Answers0