.......
set rs=server.createobject("adodb.recordset")
rs.open"select * from 表1 where id=1 or id=2",conn,1,1 '如果ID是文本类型就加单引号
while not rs.eof
conn.execute"insert into 表2(id,名称,规格) values("&rs("id")&",'"&rs("名称")&"','"&rs("规格")&"')"
rs.movenext
wend
........
set rs=conn.execute ("select id,名称,规格 from 表1 order by id")
if not rs.eof then
i=0
do while not rs.eof
if i<2 then conn.execute ("insert into 表2 (id,名称,规格) values("&rs(0)&",'"&rs(1)&"','"&rs(2)&"')")
rs.movenext
i=i+1:if i>=2 then exit for
loop
rs.close:set rs=nothing