adoquery1.SQL.Text :='select jh,(yc+sl) as 当前月产量 from dba where ny=''200112''';
adoquery1.SQL.Text :='select jh,(yc+sl) as 对比月产量 from dba where ny=''199802''';如何把这俩条sql合在一起,
显示在表格中的结果:
jh 当前月产量 对比月产量
name1 102 150
adoquery1.SQL.Text :='select jh,(yc+sl) as 对比月产量 from dba where ny=''199802''';如何把这俩条sql合在一起,
显示在表格中的结果:
jh 当前月产量 对比月产量
name1 102 150
(select jh,(yc+sl) as 当前月产量 from dba where ny='200112') t1,
(select jh,(yc+sl) as 对比月产量 from dba where ny='199802') t2
where t1.jh=t2.jh