求一条delete语句 Delete From A Where D <> TnDelete From A Where Datediff(day, D, Tn) <> 0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Delete A where D <> Tn orDelete A where datediff(day,D,Tn) <> 0orDelte A where convert(char(10),D,120) <> convert(char(10),D,120)... delete A表 where month(d)<>month(Tn) To all:1、注意是月份相等2、日期可能跨年 Delete A where datepart(m,d) <> datepart(m,Tn) delete from A where convert(char(7),D,111)<>convert(char(7),Tn,111) Delete A where datepart(m,d) <> datepart(m,Tn) Delete A where datepart(m,D) <> Tn delete from A表 where datepart(m,D)not in(select datepart(m,T1)unionselect datepart(m,T2)union...select datepart(m,Tn)) delete A表 where month(d) not in (month(1),month(2),....month(Tn)) delete A表 where datename(mm,Tn)<>d to myflok(阿棋)同意 我觉得 mjhnet(天涯沦落人) 的应该可以,我明天试一试! Delete A where month(D) not in (month(@t1),month(@t2),month(@tn)) to pengdali(大力 V2.0) :如果是不同年份的两个记录月份相同,这样能删除对应年的记录,保留不对应年份的记录吗?比如A中有一条2003-9-1的记录,我想删除的是与2002-9-1相同年月份的记录,而不删除2003-9-1记录?你的可以吗? to pengdali(大力 V2.0):你的方法在query中可以删除所有数据,但是在存储过程中,只能删除最上面一条数据??? to pengdali(大力 V2.0):是我搞错了,忘了set ROWCOUNT 0 Delete A where convert(char(6),T,112) not in (convert(char(6),@t1,112),convert(char(6),@t2,112),convert(char(6),@tn,112)) 菜虾有问 大小写敏感的问题 求一天语句。 一张表里已经有两个主键,我现在想再给它加一个主键。 一个显示格式转换的题目请教各位高手! coalesce 怎么用?给个例子啊 鸟哥初问(+100):直接执行语句可以,放到存储过程中不行,为什么? 用存储过程实现复制记录的问题 SQL数据库网站不能更新,只可修改 请问Access 2000能否将mdb数据库转换成1.x版的? [Microsoft][ODBC SQL Server Driver]通讯链接失败 image字段类型,当图片大于32k时,出问题。 一系列审批的表如何设计?
or
Delete A where datediff(day,D,Tn) <> 0
or
Delte A where convert(char(10),D,120) <> convert(char(10),D,120)
...
1、注意是月份相等
2、日期可能跨年
where datepart(m,D)
not in
(
select datepart(m,T1)
union
select datepart(m,T2)
union
...
select datepart(m,Tn)
)
同意
如果是不同年份的两个记录月份相同,这样能删除对应年的记录,保留不对应年份的记录吗?比如A中有一条2003-9-1的记录,我想删除的是与2002-9-1相同年月份的记录,而不删除2003-9-1记录?你的可以吗?
你的方法在query中可以删除所有数据,但是在存储过程中,只能删除最上面一条数据???
是我搞错了,忘了set ROWCOUNT 0