放在同一个表中: insert into table select jbgz,qtgz,getdate(),.... from table where jsrq=XXXXXX--上个月的 建新表: select jbgz,qtgz,getdate(),.... into newTable from table where jsrq=XXXXXX--上个月
先DELARE 一个游标。。 OPEN 提取每条数据FETCH 。。INTO 。(你要的参数)插入表。WHERE 。FETCH NEXT CLOSE
就edit;
finalebyname('date').asstring:=formatdatetime('yyyy-mm-dd',date);
post;
如果不存在就
append;
...
...
post;
insert into table select jbgz,qtgz,getdate(),.... from table where jsrq=XXXXXX--上个月的
建新表:
select jbgz,qtgz,getdate(),.... into newTable from table where jsrq=XXXXXX--上个月
OPEN
提取每条数据FETCH 。。INTO 。(你要的参数)插入表。WHERE 。FETCH NEXT
CLOSE
a:创建临时表(结构)
b:创建好临时表后插入数据
c:更改临时表中的数据
d:把临时表中更改好的数据插入到原表
e:删除临时表