Hi I have the following table:
Doc | code | Qty | Next 5211386 | 91992 | 1 | 52183 5211386 | 91992 | 1 | 52182
I trying to
Sounds like you're looking for a group_concat like function found in MySQL. Check out Allen Browne's solution
SELECT Doc, code, Sum(Qty), ConcatRelated("[Next]","TableName",,,"-") as [Next] FROM TableName GROUP BY Doc, code