This is a discussion on Sql Query with one column as the name to another column within the SQL Server forums, part of the Microsoft SQL Server category; --> Hi There Does anyone know how to create a query or do something in a stored procedure to output ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi There Does anyone know how to create a query or do something in a stored procedure to output one column as the other columns name? The output I want is something like this: CurrentMonth(Jun 05) May 05 April 05 ItemCode Units Price Units Price Units Price A 10 10.00 5 8.00 12 12.00 The month displayed as the column names will be in fields CurrentMonthDesc, SalesHistoryDesc1, SalesHistoryDesc2 etc. Now I want these to be the headings to Current, SalesHistory1, SalesHistory2 etc. Please help! Kind Regards Marlene |