I have a table with columns ProjectId and InfoFile, where Infofile is a varbinary column. There can be many images for a project, stored in the InfoFile column.
I want to get all the images for a project in columns instead of rows.
A simple select query return results like this:
ProjectA file1
projectA file3
projectB file10
projectB file22
I want the result like below:
ProjectA file1 file3
projectB file10 file22
I need only the single field "Infofile' to be shown in rows. Also if the infofile has null, then I dont want that to shown in column.
Other answers are for multiple fields, but here there is only one field.
Any help is appreciated.