Home Group Columns Through SQL Without Using The Pivot Function
Reply: 0

Group Columns Through SQL Without Using The Pivot Function

user605
1#
user605 Published in June 18, 2018, 1:06 pm

I have the following table.

Store, Code, Active 
1000, C, N  
1000, D, N  
1000, J, N   
1000, R, N   
2000, C, N  
2000, D, N  
2000, J, N  
2000, R, N  
2000, F, N  
3000, C, Y  
3000, D, Y  
3000, J, Y  
3000, R, Y  
4000, C, Y  
4000, D, Y  
4000, J, Y  
4000, R, Y  
4000, F, Y      

I would like to change it in SQL so that it shows like this.

Store, CDJR, CDJRF 
1000, N, N/A  
2000, N/A, N  
3000, Y, N/A  
4000, N/A, Y  

Keep in mind that there are thousands of rows like this. Any help would be appreciated.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304665 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO