MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MS Access SQL Query Help

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
spalanis
Beginner


Joined: 19 Jul 2006
Posts: 32
Topics: 15

PostPosted: Mon Nov 17, 2014 7:08 am    Post subject: MS Access SQL Query Help Reply with quote

Dear All,
I have a MS Access DB source data in the format listed below.
Code:

Status    Location   Count   Team#   Team Name     
Billable   Offsite       7       1   Team1         
Billable   Offsite      14       2   Team2         
NB         Offsite       1       2   Team2         
Billable   Offsite       9       3   Team3         
Billable   Onsite       17       4   Team4         
Billable   Offsite       1       5   Team5         
Billable   Onsite       35       6   Team6         
Billable   Onsite       29       7   Team7         
Billable   Offsite      16       8   Team4         
Billable   Onsite       11       9   Team8         
NB         Onsite        1       9   Team8         
Billable   Onsite        1      10   Team9         
Billable   Onsite        3      11   Team10       
Billable   Offsite       7      12   Team11       
Billable   Offsite       3      13   Team12       


I am looking for an MS Access SQL which will transpose (or cross table or inner join...whatever) the above data into the below format.
Code:

Team#   Team Name   ON_B   ON_NB   OF_B     OF_NB     
    1   Team1          0       0      7         0     
    2   Team2          0       0     14         1     
    3   Team3          0       0      9         0     
    4   Team4         17       0      0         0     
.........and so on   



Note:
Code:

ON - Onsite
OF - Offsite
B - Billable
NB - Non Billable

I am kind of breaking my head since morning to achieve it using Cross table, Row to column converter...etc. Please assist if you have a handy solution.

Thanks,
Srini
Back to top
View user's profile Send private message
CraigG
Intermediate


Joined: 02 May 2007
Posts: 202
Topics: 0
Location: Viginia, USA

PostPosted: Mon Nov 17, 2014 8:56 am    Post subject: Reply with quote

And what does MS Access DB have to do wiith MVS?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group