delete from
from osrd a
where a.myid !=
(select max(myid) from osrd b where b.ItemCode=a.ItemCode and b.DocType=a.DocType and b.DocEntry=a.DocEntry and b.DocLineNum=a.DocLineNum)错误信息:
服务器: 消息 156,级别 15,状态 1,行 2
在关键字 'from' 附近有语法错误。
from osrd a
where a.myid !=
(select max(myid) from osrd b where b.ItemCode=a.ItemCode and b.DocType=a.DocType and b.DocEntry=a.DocEntry and b.DocLineNum=a.DocLineNum)错误信息:
服务器: 消息 156,级别 15,状态 1,行 2
在关键字 'from' 附近有语法错误。
where a.myid !=
(select max(myid) from osrd b where b.ItemCode=a.ItemCode and b.DocType=a.DocType and b.DocEntry=a.DocEntry and b.DocLineNum=a.DocLineNum)
from osrd a两个from ,笔误?
delete a
from osrd a
where a.myid !=
(select max(myid) from osrd b where b.ItemCode=a.ItemCode and b.DocType=a.DocType and b.DocEntry=a.DocEntry and b.DocLineNum=a.DocLineNum)
delete a from
from osrd a
where exists
(select max(myid) from osrd b where b.ItemCode=a.ItemCode and b.DocType=a.DocType and b.DocEntry=a.DocEntry and b.DocLineNum=a.DocLineNum and myid>a.myid)