I want to select only fpo's that have the complete column = yes. The thing about this is that I only want it to be selected it if all fpo's with that fpo number are have the complete column = yes. Because an fpo contains multiple batches. Unless every batch is complete the fpo is not complete. All batches need to be complete to have an fpo complete.
Thats why I need to be able to select only fpos with the same fpo number = yes in the complete column.
If you look at this information you can tell that this fpo # is not complete because under coplete you have a few nulls.
This table contains 1000's of fpo so I can't provide the fpo number for each to check if it is complete.
I think you'll have to break it into two queries instead of one. Perhaps you could create a temporary table inwhich all fpo's are insterted that have the complete = 'yes' value. Then delete from the temp. those with null.