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
 Other Forums
 Other Topics
 SQL Query

Author  Topic 

saa18
Starting Member

1 Post

Posted - 2008-11-12 : 06:31:48
Dear Friends,

Please help me getting soln for the below query.

A table consists of few records, given below, I have to get output in a single row.

ClassName Date Time Description
--------- ------ ------ ------------
K-11 10/10 08:30 Exam Hall
K-11 10/10 09:30 PGP Room
K-11 10/10 10:00 FPM Room
K-12 10/10 10:00 Audioturium


Output I should get as below using single sql command

ClassName 08:00 08:30 09:00 09:30 10:00 10:30
--------- ----- ----- ----- ----- ----- -----
K-11 08:30 09:30 10:00

Thanking you,

With Regards,
Asif

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-12 : 06:34:31
Search PIVOT or CROSS TAB queries.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-12 : 06:35:30
you may be better off posting this in SQL 2005 or 2000 forums
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-12 : 06:40:46
Maybe poster uses MS Access?



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-12 : 06:43:43
Then also there's a seperate forum for MSAccess
Go to Top of Page
   

- Advertisement -