|
...
sql_update="update T1,T2 set T1.MONEY=T1.MONEY+T2.MONEY where T1.CODE=T2.CODE"
conn.execute(sql_update)
sql_select="select T2.code,T2.money from T2,T1 where T1.CODE<>T2.CODE"
...
rs.open sql_select,conn,1,3
do while not rs.eof
sql_insert="insert into T1 (code,money) values ('"&rs(0)&"','"&rs(1)&"')"
conn.execute(sql_insert)
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing |
|