I need to select all the rows if and only if they have a value ‘Y’ for all the following columns in sql server.
Bike_Racks_Lockers SHELTERS Telephone Lighting FENCES
N N Y Y Y
N N N N Y
N N N N N
Y Y Y Y Y
? ? ? ? ?
N N N N N
EDIT:
In that case, do the checking separately and insert into other table. Example: