Pusher
BEOGRAD Put
- Local time
- Today, 23:25
- Joined
- May 25, 2011
- Messages
- 230
Hi all,
I made a Query that has this code, and when i run it i have the right order, descending…
But when i put it in a report i get the reverse order of Count ID_GRESKE ascending. How do i fix this?
I made a Query that has this code, and when i run it i have the right order, descending…
Code:
SELECT TOP 5 IZVESTAJ.ID_UREDJAJ, IZVESTAJ.ID_RASKRSNICE, Count(IZVESTAJ.ID_GRESKE) AS CountOfID_GRESKE
FROM IZVESTAJ
WHERE (((IZVESTAJ.DATUM_IZVESTAJA) Between Nz([forms]![FrmPrikazIzvestaja]![txtStart],[forms]![FrmPrikazIzvestaja]![txtAltStart]) And Nz([forms]![FrmPrikazIzvestaja]![txtEnd],[forms]![FrmPrikazIzvestaja]![txtAltEnd])) AND ((IZVESTAJ.NEZAVRSENE_INTERVENCIJE)=Yes))
GROUP BY IZVESTAJ.ID_UREDJAJ, IZVESTAJ.ID_RASKRSNICE
HAVING (((IZVESTAJ.ID_UREDJAJ)=[Forms]![FrmPrikazIzvestaja]![Combo58]) AND ((Count(IZVESTAJ.ID_GRESKE)) Is Not Null))
ORDER BY Count(IZVESTAJ.ID_GRESKE) DESC;