Avatar of mrong
mrong

asked on 

SQLserver 9 Cross tab query

Greeting,
I have a select stmt(select NUM,Week_Day,InOUT from TBL1) which give me the data in the following format.
NUM     Week_Day     InOut
0001       MONDAY     8-16
0001       TUESDAY     8-15
0001       WEDNESDAY 9-4
0002       FRIDAY    9-14
I  need to have a query which give me the following output
NUM    MONDAY   TUESDAY  WEDNESDAY  THURSDAY   FRIDAY
0001     8-16             8-15           9-4
0002                                                                                     9-14
Microsoft SQL Server 2005Microsoft SQL Server 2008SQL

Avatar of undefined
Last Comment
chaau
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft SQL Server 2005
Microsoft SQL Server 2005

Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.

72K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo