复合查询语句报错
IF ((comboBox2.text)<>'') AND ((comboBox1.text)<>'') THENSQL.Add('SELECT ROWNUM AS 序号,DEPT_ID AS 区域,BURE_NO AS 所属局,dev_code AS 管道段编码,P_LEN AS 管道段长度,STREET AS 道路名,P_HOLEN AS 总孔数,OPER_DATE AS 投产日期 FROM TTMP_OBJ_PM WHERE (bure_no LIKE '+''''+'%'+Trim(ComboBox2.Text)+'%'+''') AND (dept_id LIKE '+''''+'%'+Trim(ComboBox1.Text)+'%'+''')');
注:WHERE (bure_no LIKE '+''''+'%'+Trim(ComboBox2.Text)+'%'+''') AND (dept_id LIKE '+''''+'%'+Trim(ComboBox1.Text)+'%'+''')'); 中间用 and连接报错,单独查询正常