MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael C. Podlesny Date:July 23 2003 7:47pm
Subject:HELP WITH mySQL!!!
View as plain text  
UGHH HELP!!

I need to write a sql statement that will take the data from my table and
use it as column headers.  For example,

If I have a field named GoLiveDate and a field called Qty and a field called
Cars:

Cars  |  Qty  |  GoLiveDate
==================
CarA |  5     |  7/21/2003
CarA | 10    |  7/28/2003
CarA | 14    |  8/1/2003
CarB |  2     |  7/21/2003
CarB | 3    |  7/28/2003
CarB | 4    |  8/1/2003
CarC |  7     |  7/21/2003
CarC | 19    |  8/28/2003
CarC |  44    |  9/1/2003

The results should be

Cars        July        August        September
==============================
CarA        15            14                0
CarB        5                4                0
CarC        7                19            44


Any help that you could give or point me to where I can find a solution
would help.  I am getting stuck on making the Month name's of the dates the
column headers


Thanks,
Mike

Thread
mysql stops processingJoe Shear23 Jul
RE: mysql stops processingAndrew Braithwaite23 Jul
  • RE: mysql stops processingJoe Shear23 Jul
  • HELP WITH mySQL!!!Michael C. Podlesny23 Jul
    • Re: HELP WITH mySQL!!!Nils Valentin24 Jul
Re: mysql stops processingHeikki Tuuri23 Jul
  • Re: mysql stops processingJoe Shear23 Jul
Re: mysql stops processingHeikki Tuuri23 Jul
  • Re: mysql stops processingJoe Shear23 Jul
RE: mysql stops processingAndrew Braithwaite23 Jul
Re: mysql stops processingHeikki Tuuri23 Jul
Re: mysql stops processingHeikki Tuuri24 Jul
  • Re: mysql stops processingJoe Shear24 Jul
Re: mysql stops processingHeikki Tuuri24 Jul
Re: mysql stops processingInfo26 Jul
Re: mysql stops processingInfo26 Jul