SQL: select group_name,gc_flag,source_name,l,b,met2_objects.ra,met2_objects.dec,vmean,vpeak,det,peak_6,peak_12,rms_6,rms_12,int_6,vspan_6,vspan_12,line,type,refs,type,simbad_types from met2_objects LEFT JOIN object_categories ON met2_objects.group_name = object_categories.group_name_cat AND object_categories.tbl_cat = 'met2_objects' LEFT JOIN assoc ON met2_objects.group_name = assoc.grp AND assoc.tbl = 'met2_objects' WHERE (((det ilike '%Y%' OR det ilike '%N%')) AND (refs ilike '%MAC98%')) ORDER BY l,b