本数据中有3人学号和姓名相同,如何用命令删除这3人中公司为“空值”的记录。[有文件]
谢谢
这是文件下载地址 http://good.gd/1566245.htm
[解决办法]
USE 1111 IN 0 ALIAS a
Delete A From a ,(SELECT 学号,姓名_,Count(*) As 重复次数 From a Group By 学号,姓名_ Having Count(*)>1) b ;
where a.学号=b.学号 And a.姓名_=b.姓名_ And Empty(a.公司)
[解决办法]
Delete From a Where 姓名_ in (Select 姓名_ from a Where !Empty(公司)) And Empty(公司)Pack
[解决办法]
Use c:\1111.Dbf
Index On 学号+姓名_ To sy
Total To 新表名 On 学号+姓名_
Use 新表名
Browse
[解决办法]
DELETE FROM aaaa WHERE Empty(公司) AND exists(SELECT 1 FROM aaaa a1 WHERE a1.学号=aaaa.学号 AND a1.姓名_=aaaa.姓名_ and !Empty(a1.公司))