如何删除ASP
1个回答
展开全部
。
SqlServer的sql语句:
delete from vtime where cast(id as varchar(10))+' | '+convert(varchar(25),time,120) not in (select cast(id as varchar(10))+' | '+convert(varchar(25),maxtime,120) from (select id,max(time) as maxtime from vtime group by id) a)
看看是否能达到你的要求。
-------------------
请楼主下次提问题时先说明数据库。
access的对应语句如下:
delete from vtime where cstr(id)+' | '+cstr(time) not in (select cstr(id)+' | '+cstr(maxtime) from (select id,max(time) as maxtime from vtime group by id) a)
SqlServer的sql语句:
delete from vtime where cast(id as varchar(10))+' | '+convert(varchar(25),time,120) not in (select cast(id as varchar(10))+' | '+convert(varchar(25),maxtime,120) from (select id,max(time) as maxtime from vtime group by id) a)
看看是否能达到你的要求。
-------------------
请楼主下次提问题时先说明数据库。
access的对应语句如下:
delete from vtime where cstr(id)+' | '+cstr(time) not in (select cstr(id)+' | '+cstr(maxtime) from (select id,max(time) as maxtime from vtime group by id) a)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询