Access Query headaches!
May 27, 2006 6:33 PM
Subscribe
I have a access query that is making me tear my hair out. My database has 40 fields that have three possible values (OK, NG, NA). I need to list only the entries that have NG in any one of those 40 fields.
Basically each entry has a series of questions and each time the answer is NG the person using the database will put some additional information in the field after the OK/NG/NA field. This repeats for 40 different questions.
So each seperate entry into the table has all 80 fields with the possible NG info.
I need to craft a query that will only pull out the entries in the table that have NG in ANY of the 40 spots.
I tried putting "NG" in the criteria for each of the 40 fields and I get no output at all. If I just do it in one it works ok.
posted by JonnyRotten to computers & internet (23 comments total)
1 user marked this as a favorite
SELECT * FROM tableName WHERE (tableName.column1 LIKE '%NG%') or (tableName.column2 LIKE '%NG%') etc. etc. etc...
If this isn't what you mean, please clarify your terms: columns, rows, cells, etc.
posted by Civil_Disobedient at 6:37 PM on May 27, 2006