2
I have a table in a Sqlserver database that simulates a bingo card. In total there are 25 fields that represent the card: n1, n2, n3, ..., n25
Let’s say I drew the numbers 5, 28 and 67, as I do a select to see if the current chart has these numbers in the fields I mentioned above?
I need something like this select * from cartelas where n1, n2, n3..., n25 in [5, 28, 67]
I know it’s too much to ask, but the result would have to be similar to:
Cartela | Acertos
1 | 3
2 | 3
3 | 2
4 | 1
5 | 1
6 | 1
I don’t even know if something like this is possible just by using select, but I’m waiting for some suggestion.
It seems to me that the simplest form is through the use of bit map.
– José Diz