For MSACCESS query, I have a table with 3 fields as following:
ID1 ID2 ID3
101 1001 1
102 1001 1
101 1002 1
102 1003 2
102 1004 3
103 1004 3
104 1004 4
I would like to create a string with all recorded ID1 for each ID2, my desired output is following:
ID2 ID3 output
1001 1 101-102
1002 1 101
1003 2 102
1004 3 102-103
1004 4 104
There are 2 possible ID1 value for ID2=1001, which is 101 and 102. Thus the desired string is 101-102 (assume no duplication by considering both fields ID1, ID2)
My attempt Based on @Erik suggestion, i tried below while have error message on type mismatch.
Select T.[ID2] + T.[ID3]
, GetList("Select [ID 1] From tblCEPAlert As T1 Where T1.[ID2] + T1.[ID3] = " & T.[ID2] + T.[ID3],"",", ") as output
From tblCEPAlert AS T
Group By T.[ID2] + T.[ID3];