I have the table1, i want to transpose it as shown in table1_1, can anyone tell me the query/function that can be used to do this
table 1
FileName
Have a look at crosstab queries used with Min, Max and Last.
Transpose:
TRANSFORM First(Table1_1.Data) AS FirstOfData
SELECT Table1_1.FileName, Table1_1.ObjectName
FROM Table1_1
GROUP BY Table1_1.FileName, Table1_1.ObjectName
PIVOT Table1_1.Column;
Normalize:
SELECT FileName, ObjectName, "Column1" As ColName, Column1 As ColData
FROM Table1
UNION ALL
SELECT FileName, ObjectName, "Column2" As ColName, Column2 As ColData
FROM Table1
UNION ALL
SELECT FileName, ObjectName, "Column3" As ColName, Column3 As ColData
FROM Table1
UNION ALL
SELECT FileName, ObjectName, "Column4" As ColName, Column4 As ColData
FROM Table1
UNION ALL
SELECT FileName, ObjectName, "Column5" As ColName, Column5 As ColData
FROM Table1