How to create CROSSTAB query with TWO VALUES

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr Key
    New Member
    • Aug 2010
    • 132

    How to create CROSSTAB query with TWO VALUES

    Hi all!
    I have my table with four columns as shown below
    Code:
    [B]ModCode	 CA	SE	IDs[/B]
    ETT04101	1	45	AbC8976
    ETT04101	2	45	ABCD0912
    ETT04102	8	41	AbC8976
    ETT04102	9	45	ABCD0912
    I want it to be like this one
    Code:
    [B]IDs	ETT04101(CA)	ETT04102(SE).....[/B]
    AbC8976	   1	             45
    ABCD0912      2                45  
    AbC8976	    8	           41
    ABCD0912       9               45
    It looks like normal CROSS-TAB but it has two column headings of two values CA and SE
    How can I achieve this?
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    Here are two links that should help:





    Please post back your SQL once you have it so that others and see your success or, if needed, we can help you to tweek it into shape!

    Please remember to format posted SQL or other code using the <CODE/> formatting button.

    Comment

    • Mr Key
      New Member
      • Aug 2010
      • 132

      #3
      Thanks Zzz!
      I have tried the suggestions posted by Allen Brown athttp://allenbrowne.com/ser-67.html and it works fine. Thank you

      Comment

      Working...