VB+SQL Server7.0,有两个表,假设为table1和table2,都包含下面三个字段:
pos1(float),pos2(float),date(char)
table1中的pos1和pos2是没有数据的,我想把table2中的这两个字段的数
据倒入到table1中来,条件是根据两个表中的date的值来对应,如表1:
pos1 pos2 date
NULL NULL 2003-2-4表2:
pos1 pos2 date
203.3 12.345 2003-2-5
201.3 2.345 2003-2-4上面就是要把table2的第二条记录中的pos1和pos2的值更新到table1中
SQL语句怎么写?应该是update吧,但我VB不太熟
pos1(float),pos2(float),date(char)
table1中的pos1和pos2是没有数据的,我想把table2中的这两个字段的数
据倒入到table1中来,条件是根据两个表中的date的值来对应,如表1:
pos1 pos2 date
NULL NULL 2003-2-4表2:
pos1 pos2 date
203.3 12.345 2003-2-5
201.3 2.345 2003-2-4上面就是要把table2的第二条记录中的pos1和pos2的值更新到table1中
SQL语句怎么写?应该是update吧,但我VB不太熟
from table1 as a,table2 as b
where a.date=b.date
from table1 as a,table2 as b
where a.date=b.date