List:General Discussion« Previous MessageNext Message »
From:VR Venugopal Rao Date:April 28 2010 9:54am
Subject:Pivot Query in
View as plain text  
I am working on Java-HTML-MS Access Backend database.

Now office is removing all unlicensed softwares and they are removing
microsoft applications also and hence the necessity to shift from MS Access
to MySQL has arised.

In MS Access I used to generate one pivot query which gets the following
report from the database which contains the following fields:

Date, ProjectCode Building, Number of Copies

 

I want to get a Connsolidate Report of 

Project Code   R&D   STP

1007304----------04-------04

(Group by Project Code)(Sumtotal Building wise).

 

I have tried to execute the following code :

select pcode, building, sum(ncopies) from request group by pcode,building

 

It is giving the following repott

1007304--R&D--04

1007304-STP--05

Here there is a repetition of pcode,

 

How can I avoid this. I want to get the Building Name on top as Column Names
and bottom I should get the Count.

 

-- 
With regards,
VR Venugopal Rao
91-90526-07186 

 

______________________________________________________________________________

DISCLAIMER

The information contained in this e-mail message and/or attachments to it may
contain confidential or privileged information. If you are not the intended
recipient, any dissemination, use, review, distribution, printing or copying
of the information contained in this e-mail message and/or attachments to it
are strictly prohibited. If you have received this communication in error,
please notify us by reply e-mail or directly to netsupport@stripped or
telephone and immediately and permanently delete the message and any
attachments. Thank you.


______________________________________________________________________________

This email has been scrubbed for your protection by SecureMX.
For more information visit http://securemx.in
______________________________________________________________________________



Thread
Pivot Query in VR Venugopal Rao28 Apr
  • Re: Pivot Query innwood28 Apr
  • RE: Pivot Query in Jay Blanchard28 Apr
    • Re: Pivot Query inPeter Brawley28 Apr
    • Pivot Query in MySQLVR Venugopal Rao29 Apr
    • How to Get Running Totals.Venugopal Rao3 May
      • Re: How to Get Running Totals.Peter Brawley3 May