Sorry, I'm new and if I make post this incorrectly please let me know and I will fix it.

I'm using sql server 2008.

I need help trying to find a way to locate all possible combination in a field that's repeated 3 more times by designated number. For example for like the word DOG. I need to see all combination as in DOG, DO, DG, OD, OG, GOD, OGD, ODG, DGO, etc if there are others. I have field that would have records like d, o, g which I'm thinking about stringing them.

So each d, o, and g would also have specific numbers assigned to them as their identifier such as 1001. As such if we call the field with the identifiers as field1 and fields with letter like 'd' field2 then for every field1 there would be field2. Of course 1001 for field1 could have more than one field2 data as I explained so 1001,d - 1001,o - 1001,g and so on.

If a field1 has more than 1 instances of field2 and that same combination of data in field2 shows up more than 3 or more times with any field1 data then I need to be able to see it.

Does this all make sense? I feel like I'm just talking out of my butt...