แบบนี้คับพี่ดุสิต...
UniQuery1.Close;
UniQuery1.sql.Clear;
sql:= 'SELECT * from law_print_td9_detail ldetail ' +
' LEFT OUTER JOIN law_print_td9_detail_see dsee on ldetail.td9_num=dsee.td9_num ' +
' WHERE (have_yes <> "N" OR have_no <> "N") ' +
' And jamlai_cid = ' + JLQr.FieldByName('accused_cid').AsString + ' ';
UniQuery1.SQL.Add(sql);
UniQuery1.Open;