|

楼主 |
发表于 2010-1-5 09:54:29
|
显示全部楼层
sorry,两天不在,回复晚了
跟踪query.execute,就是此句报错
代码就是执行一个update语句
with QueryBack do
begin
CommandText:=Format('update table_runtimedata r set '
+'r.fstate = 1 '
+'where r.fdatetime >= add_months(to_date(''%s'',''yyyy-mm-dd''),1) '
+'and r.fdatetime <= add_months(to_date(''%s'',''yyyy-mm-dd''),1) '
+'and r.ftargetcode in '
+'(select t.ftargetcode '
+'from table_target t, table_commoncode report '
+'where 1 = 1 '
+'and instr(report.Fcustom4 ,t.FBIZTYPECODE)>0 '
+'and t.fstatinternalcode = ''M'' '
+'and instr(report.fcustom7, '''''''' || t.ftargetdefcode || '''''''', 1, 1) > 0 '
+'and t.fentitycode in (%s) '
+'and report.fcode = ''%s'' '
+'and report.fparentid = ''02010502'')',
[AYear+'-'+ABeginMonth+'-1',
AYear+'-'+AEndMonth+'-1',
TINFOINPUTREPORT(InfoBroker).GetRptEntityFilter(AReportType,AEntityCode),
AReportType]);
Execute;
end; |
|