Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: query:Row to column


Message #1 by "carlier jacques" <jacques.carlier@c...> on Thu, 28 Nov 2002 15:29:17
HI,

i have a query with the results like :

code	miso	SommeDeSommeDemontant
A 01.01	DEV	378835,11
A 01.01	EUR	23534347,64
A 03.01	DEV	92772736,33
A 03.01	EUR	930506032,91
A 03.02	DEV	91796800,5
A 03.02	EUR	1454139185,19





i would like   to have  this layout :


code	  SOmmeDeSommeDemontant_DEV      SOmmeDeSommeDemontant_EUR
A 01.01   378835,11                      23534347,64
A 03.01   92772736,33                    930506032,91 
......


How could i make such a query ???


THANKS a lot    ( in advance)

J. carlier
BRUSSELS
belgium


Message #2 by "Bob Bedell" <bobbedell15@m...> on Thu, 28 Nov 2002 18:33:36 +0000
Hello Jacques,

SELECT
    C1.code,
    C1.SommeDeSommeDemontant AS SommeDeSommeDemontant_DEV,
    C2.SommeDeSommeDemontant AS SommeDeSommeDemontant_EUR
FROM
    [SELECT * FROM Table1 WHERE miso = 'DEV']. AS C1
INNER JOIN
    [SELECT * FROM Table1 WHERE miso = 'EUR']. AS C2
ON
    C1.code=C2.code;


Best,

Bob

>From: "carlier jacques" <jacques.carlier@c...>
>Reply-To: "Access" <access@p...>
>To: "Access" <access@p...>
>Subject: [access] query:Row to column
>Date: Thu, 28 Nov 2002 15:29:17
>
>HI,
>
>i have a query with the results like :
>
>code	miso	SommeDeSommeDemontant
>A 01.01	DEV	378835,11
>A 01.01	EUR	23534347,64
>A 03.01	DEV	92772736,33
>A 03.01	EUR	930506032,91
>A 03.02	DEV	91796800,5
>A 03.02	EUR	1454139185,19
>
>
>
>
>
>i would like   to have  this layout :
>
>
>code	  SOmmeDeSommeDemontant_DEV      SOmmeDeSommeDemontant_EUR
>A 01.01   378835,11                      23534347,64
>A 03.01   92772736,33                    930506032,91
>......
>
>
>How could i make such a query ???
>
>
>THANKS a lot    ( in advance)
>
>J. carlier
>BRUSSELS
>belgium
>
>


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


  Return to Index