2

I'm trying to find patterns in two columns in a very large table. My data looks like this:

Name | Break  
Tom  | A  
Tom  | B 
Tom  | C 
Ben  | D 
Ben  | E 
Ben  | F 
Joe  | A 
Joe  | B 
Joe  | C 

So I want to know that Tom and Joe both shared identical breaks, "a b c" while Ben did not. I'm assuming the best format of this is to concatenate the breaks to a single record, while using group by in the name field. So my result might be:

Name | Group  
Tom  | ABC  
Joe  | ABC  
Ben  | DEF  

This would allow me to use easier sql functions I am more familiar with like count() and group by. Any way to do this in access? VBA?

juergen d
  • 201,996
  • 37
  • 293
  • 362
joeumlo
  • 51
  • 1
  • 8
  • See this [Listagg topic](http://stackoverflow.com/questions/15477743/listagg-in-sqlserver) – davidhigh Sep 22 '14 at 20:23
  • What if they only share A or B? – Mark C. Sep 23 '14 at 14:08
  • That is a good question OverMind, I am unsure how to deal with this. Currently I am thinking of using a *like* command in sql to pull those inner relationships out. Very confusing! – joeumlo Sep 23 '14 at 15:01

0 Answers0