I have sql table with 50 columns and 1million records. I have a query that matches user serial numbers against the master list to get a return of hits. My query is a count of records for each column, so the return is only 1 record with a count of matches per column. Some of the columns do not have any values. My challenge is to only have a query with columns that have a value greater than 0.
In other words, I want to reduce the number of columns from 50 to whatever has a value.
I can't think of a good way to do this, I tried using dlookup with an if/else statement, but I would have to create a new statement for each column. Can anybody offer a functional way to do this?
Thanks for all of your help,
Bob