sql.Text := 'select sbjj.cntr_no as 箱号,sbjj.date as 时间 from sbjj where cntr_no not in (select cntr_no from cmt ),date between '''+str1+''' and '''+str2+''''
sql.Text := 'select sbjj.cntr_no as 箱号,sbjj.date as 时间 from sbjj where cntr_no not in (select cntr_no from cmt ) and date between '''+str1+''' and '''+str2+'''' ^
sql.Text := 'select sbjj.cntr_no as 箱号,sbjj.date as 时间 from sbjj where (cntr_no not in (select cntr_no from cmt )) and (date between '''+str1+''' and '''+str2+''')' ^
sql.Text := 'select sbjj.cntr_no as 箱号,sbjj.date as 时间 from sbjj where sbjj.cntr_no not in (select cntr_no from cmt )) and (date between '''+str1+''' and '''+str2+''')';
sql.Text := 'select sbjj.cntr_no as 箱号,sbjj.date as 时间 from (select * from sbjj where date between '''+str1+''' and '''+str2+''' ) where cntr_no not in (select cntr_no from cmt )'