I am using a nested query in a crosstab query to essentially do this:
original table:
ID Phone Number 1 111-111-1111 2 222-222-2222 2 222-222-2222 3 333-333-3333 4 444-444-4444 4 444-000-0000
query:
ID Phone Number 1 Phone Number 2 1 111-111-1111 2 222-222-2222 3 333-333-3333 4 444-444-4444 444-444-0000
SQL:
TRANSFORM First([Phone No]) AS Phone1
SELECT [ID]
FROM (Select [ID],[Phone No],DCount("*","Table","[ID] ='" & [ID] & "'
AND [Phone No] <'" & [Phone No] & "'")+1 AS Seq FROM LD) AS Query1
Group by [ID]
PIVOT Seq;
However I need all of the phone numbers to be transposed into the columns even if they are duplicated. (see ex with ID 2)
Any ideas?