PB中update 语句更新sql2000数据库中datetime字段的求助。
pcwwa 2008-04-08 12:46:55 我在sql2000数据库中有一个表:renyuan
id (int型)
open_date(datetime型) 8位长度
id open_date
里面有数据例如:10001 2006.02.20
10002 2006.03.11
10003 2006.03.21
... ...
需求:想让所有表的日期都自动加上10天!
在PB中直接执行 update renyuan set open_date= open_date +10 ; 就能添加
如果我把它(天数10)放到一个变量ts中,
integer ts
ts=10
在PB中执行 update renyuan set open_date= (open_date + :ts);
这样就不好用了,请问应该如何更改语句或定义变量?