N nydelphi Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-18 #1 2个数据库表 (表结构一样)如何写循环 将表A中的内容添加到表B
H hhjjhhjj Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-18 #2 insert into B select * from A
N nydelphi Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-18 #3 with adoquery3 do<br>begin<br> close;<br> sql.Clear;<br> sql.Text:='insert into 表a select * from 表b';<br> open;<br>end;<br><br>运行出错啦
with adoquery3 do<br>begin<br> close;<br> sql.Clear;<br> sql.Text:='insert into 表a select * from 表b';<br> open;<br>end;<br><br>运行出错啦
S szhcracker Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-18 #4 不能用open,要用execute<br>除了select用open外其它的命令(如update、insert等)都要用execute
X xiangsni Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-18 #8 1.两个数据集<br>query1.first;<br>for i:=0 to query1.recordcount-1 do<br>begin<br> query2.append;<br> query2......:=query1......;<br> query2.post;<br> query1.next;<br>end;<br>2.调用导入功能
1.两个数据集<br>query1.first;<br>for i:=0 to query1.recordcount-1 do<br>begin<br> query2.append;<br> query2......:=query1......;<br> query2.post;<br> query1.next;<br>end;<br>2.调用导入功能
X xingxin00 Unregistered / Unconfirmed GUEST, unregistred user! 2008-09-19 #9 利用循环,先查出表一的内容,判断表二中是否存在,若存在则用Edit,不存在用Append,将内容添加到表二就可以了。