Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Query needed for Columns to Rows

Author  Topic 

Srain
Starting Member

23 Posts

Posted - 2010-12-30 : 07:02:39

Hi All,
I have the table and the values are defined as below:

IntDate Data
2010-12-05 00:00:00.000 12.3
2010-12-05 00:15:00.000 12.5
2010-12-05 00:30:00.000 12.8
2010-12-05 00:45:00.000 13.1
2010-12-05 01:00:00.000 13.7
2010-12-05 01:15:00.000 13.9
2010-12-05 01:30:00.000 14
2010-12-05 01:45:00.000 15


And I would like to have the select or the view statement to return the
following
Int1 Int2 Int3 Int4 Data1 Data2 Data3 Data4
2010-12-05 00:00:00.000 2010-12-05 00:15:00.000 2010-12-05 00:30:00.000 2010-12-05 00:45:00.000 12.3 12.5 12.8 13.1
2010-12-05 01:00:00.000 2010-12-05 01:15:00.000 2010-12-05 01:30:00.000 2010-12-05 01:45:00.000 13.7 13.9 14 15

So I want to convert from columns to rows
Thanks in advance,

Sachin.Nand

2937 Posts

Posted - 2010-12-30 : 09:16:11
Are you using any reporting tool to show the data ?

PBUH

Go to Top of Page
   

- Advertisement -