By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,087 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

How to create CROSSTAB query with TWO VALUES

100+
P: 131
Hi all!
I have my table with four columns as shown below
Expand|Select|Wrap|Line Numbers
  1. ModCode     CA    SE    IDs
  2. ETT04101    1    45    AbC8976
  3. ETT04101    2    45    ABCD0912
  4. ETT04102    8    41    AbC8976
  5. ETT04102    9    45    ABCD0912
  6.  
I want it to be like this one
Expand|Select|Wrap|Line Numbers
  1. IDs    ETT04101(CA)    ETT04102(SE).....
  2. AbC8976       1                 45
  3. ABCD0912      2                45  
  4. AbC8976        8               41
  5. ABCD0912       9               45   
  6.  
It looks like normal CROSS-TAB but it has two column headings of two values CA and SE
How can I achieve this?
Oct 29 '12 #1
Share this Question
Share on Google+
2 Replies


zmbd
Expert Mod 5K+
P: 5,397
Here are two links that should help:

http://allenbrowne.com/ser-67.html

http://support.microsoft.com/kb/304458

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.
Oct 29 '12 #2

100+
P: 131
Thanks Zzz!
I have tried the suggestions posted by Allen Brown athttp://allenbrowne.com/ser-67.html and it works fine. Thank you
Oct 29 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.