Jitender,
This should work and will display the months in the order you specify i.e.
Jan, Feb, Mar
select resourcetype,
'Jan-03' = max(case when resourcedate = 'jan-03'
then resourceload else '' end),
'Feb-03' = max(case when resourcedate = 'feb-03'
then resourceload else '' end),
'Mar-03' = max(case when resourcedate = 'mar-03'
then resourceload else '' end)
from testing
group by resourcetype
Regards
Christine
DBA
PricewaterhouseCoopers
Singh Jitender
<jitender.[Email Address Removed] To: "LazyDBA.com Discussion" <[Email Address Removed]
mens.com> cc:
Subject: RE: Urgent(cross tab query)!!
19/08/2003 10:57
yeah charles,
that i hv done and it work put user don't like the format as month in no.
anyother soln.
thanx
jit
_________________________________________________________________
--------------------- End of message text --------------------
This e-mail is intended only for the person to whom it is addressed. If an
addressing or transmission error has misdirected this e-mail, please notify
the author by replying to this e-mail. If you are not the intended
recipient you must not use, disclose, print or rely on this e-mail.
PricewaterhouseCoopers LLP is a limited liability partnership registered in
England with registered number OC303525. The registered office of
PricewaterhouseCoopers LLP is 1 Embankment Place, London WC2N 6RH. All
partners in PricewaterhouseCoopers UK Associates A are authorised to
conduct business as agents of, and all contracts for services to clients
are with, PricewaterhouseCoopers LLP. PricewaterhouseCoopers LLP is
authorised and regulated by the Financial Services Authority for designated
investment business.
PricewaterhouseCoopers LLP may monitor outgoing and incoming
e-mails and other telecommunications on its e-mail and
telecommunications systems. By replying to this e-mail you
give your consent to such monitoring.
----------------------------------------------------------------
Visit our website http://www.pwcglobal.com
MS Sql Server LazyDBA home page