I have this table like the one below. The top row has col names.
I need a result of a count of all the "y"'s in each col but am not sure how to do it.
I'd rather do it on the MS SQL end than pull it into a dataset and work it.
I can do one col at a time but it would create 9 hits on the db.
I'd like to grab it all in one statement.
Thanks
-dan
Gall Sall g1 g2 s1 s2 s3 s4 s5
y y n n n n n n n
y y n n n n n n n
n y y n n n n n n
y y n n n n n n n
n n n y y y n n y
y n n y n n n y y
y y n n n n n n n
y n n n n n n n n
y y n n n n n n n
y y n n n n n n n
y y n n n n n n n
y y n n n n n n n
I need a result of a count of all the "y"'s in each col but am not sure how to do it.
I'd rather do it on the MS SQL end than pull it into a dataset and work it.
I can do one col at a time but it would create 9 hits on the db.
I'd like to grab it all in one statement.
Thanks
-dan
Gall Sall g1 g2 s1 s2 s3 s4 s5
y y n n n n n n n
y y n n n n n n n
n y y n n n n n n
y y n n n n n n n
n n n y y y n n y
y n n y n n n y y
y y n n n n n n n
y n n n n n n n n
y y n n n n n n n
y y n n n n n n n
y y n n n n n n n
y y n n n n n n n