>>select * from myTable MT where not exists (select 1 from myTable where LocationID is NOT NULL and BatchID = MT.BatchID)
>>
>>Or may be better to do a left join here - the above query may be not the most optimal.
>
>That worked perfect! Thanks.
You're welcome.
If it's not broken, fix it until it is.
My Blog