I have 2 tables
CREATE TABLE Files (FileID int, fileName varchar(20))
insert into Files values (1,'F1')
insert into Files values (2,'F2')
insert into Files values (3,'F3')
CREATE TABLE Versions (FileID int, VersionNum varchar(10))
insert into Versions values (1, 'V1')
insert into Versions values (1, 'V2')
insert into Versions values (1, 'V3')
insert into Versions values (2, 'V1')
The two tables join using FileID. I want a listing of the fileName and the all corresponding versions on one line. There may not be a version for a file or there may be multiple versions for the file. The output I want is
F1, V1, v2, v3
F2, V1
F3
Any help would be appreciated.
lg