PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → WM24 [Android] ORDER BY clause in Query
WM24 [Android] ORDER BY clause in Query
Débuté par VEGEboss, 25 juin 2019 20:17 - Aucune réponse
Membre enregistré
88 messages
Popularité : +2 (2 votes)
Posté le 25 juin 2019 - 20:17
hello folks

please consider this piece of code

gCount_Fatture is SQL Query =
[
SELECT DISTINCT
db_Vendite.MVCLADOC AS MVCLADOC,
db_Vendite.ANDESCRI AS ANDESCRI,
db_Vendite.MVCODESE AS MVCODESE,
COUNT(DISTINCT db_Vendite.MVNUMDOC) AS NUMDOC
FROM
db_Vendite
GROUP BY
db_Vendite.MVCLADOC,
db_Vendite.ANDESCRI,
db_Vendite.MVCODESE
ORDER BY
db_Vendite.MVCLADOC ASC,
db_Vendite.ANDESCRI ASC,
db_Vendite.MVCODESE DESC
]


when I use it with a simple HexecuteQuery everything is fine: number of records selected, data readed and so on

BUT...

the ORDER BY clause is NOT RESPECTED

this is what I need (screenshot from WDSQL Tool)





and this is the result at runtime (screenshot from Debugger)





as you can see the columns ANDESCRI and MVCODESE are totally ignored from the sort

Someone can help?