General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only