日期:2014-05-17  浏览次数:20718 次

问你个简单的ASP+ACESS问题,我想执行这条
问你个简单的ASP+ACESS问题,我想执行这条
sql= "Delete   *   From   art   where   id   not   in(Select   min(id)   from   art   group   by   art_title) "
指令,数据库名是3609664.mdb
请问把它写成ASP文件来执行《!具体!》该怎么写?
谢谢

------解决方案--------------------
set connobj=Server.CreateObject( "ADODB.CONNECTION ")
connobj.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & Server.MapPath( "3609664.mdb ")
connobj.execute "Delete * From art where id not in(Select min(id) from art group by art_title) "
connobj.close
set connobj=nothing
------解决方案--------------------
Delete * From art where id not in(Select min(id) from art group by art_title)

把sql语句的 * 号去掉