1,076
社区成员
发帖
与我相关
我的任务
分享
我在sql查询器中用以下语句来查询数据,现在想把它写到pb中,按开始日期和结束日期查询结果。
用的sql语句是
select a,sum(b),sum(c) from
(
select a,b,c from table1,table2
where table1.rq> :rq_start and table1.rq< :rq_end
union all
select a,b,c from table3,table4
where table1.rq> :rq_start and table1.rq< :rq_end
union all
select a,b,c from table5,table6
where table1.rq> :rq_start and table1.rq< :rq_end
union all
select a,b,c from table7,table8
where table1.rq> :rq_start and table1.rq< :rq_end
union all
select a,b,c from tab9,table10
where table1.rq> :rq_start and table1.rq< :rq_end
) c group by a
datetiem ldt_start, ldt_end
ldt_start = ...
ldt_end = ...
dw_1.settransobject(sqlca)
dw_1.retrieve(ldt_start, ldt_end)