Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Query not returning correct result
I have a table that contains division, unit, position and names for the position. Next I create the following query:
SELECT Lv_pic_a.division, Lv_pic_a.unit, Lv_pic_a.position,;
ALLTRIM(Lv_pic.lastname)+", "+ALLTRIM(Lv_pic.firstname)+Lv_pic.middle;
FROM photoid!lv_pic Lv_pic_a;
GROUP BY Lv_pic_a.division, Lv_pic_a.unit, Lv_pic_a.position;
ORDER BY Lv_pic_a.division, Lv_pic_a.unit, Lv_pic_a.position, 4
all the groupings work fine, except when I do the 4th column that contains names, only one individual shows up when I know there are many individuals in the Lv_pic_a.positions. Can someone clue me in what I am doing wrong?
Thanks
Nick Patel
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement