【发布时间】:2013-03-21 10:02:26
【问题描述】:
在 Excel 中,我使用以下公式:-
="Select Count(1) Into Count1 From TRB_TPOAR Where tpo_id='" & A2 & "' and eta_id=old_eta_id and date_creation=to_date('" & B2 & "','dd/mm/yyyy HH24:MI:SS') and UTL1_EDS_ID='DEI037';
if Count1>0 then
Update TRB_TPOAR Set Eta_id=new_eta_id Where tpo_id='" & A2 & "' and eta_id=old_eta_id and date_creation=to_date('" & B2 & "','dd/mm/yyyy HH24:MI:SS') and UTL1_EDS_ID='DEI037';
DBMS_OUTPUT.PUT_LINE('" & A2 & "' UPDATED');
end if;"
在 excel 表中,B 列包含日期时间信息(例如 2013 年 1 月 14 日下午 12:20:01),但是当我应用公式时,它会添加一些其他数值。谁能帮助我,有什么变化用上面的公式吗?
【问题讨论】:
-
您是在使用 Excel 公式构建 SQL 语句,对吧?
-
是的,实际上我必须在表中插入 1000 条记录,并且每条记录中只有日期时间发生变化
标签: excel excel-formula excel-2003 formulas