您的位置:首页 > 数据库

数据库重复问题

2016-03-25 14:03 274 查看
判断日期是否有效
update Sheet1$ set date=null
where
Isdate(date)=0

select * from sheet1 where 社区网格 is null or 楼栋名称 is null or 单元 is null or 房间号 is null

身份证号码
select * from sheet1
where isdate(substring([身份证号],7,4)+'-'+substring([身份证号],11,2)+'-'+substring([身份证号],13,2))<>1

是否有重复
select * from
(
SELECT *
FROM sheet1

WHERE [身份证号] in

(
select [身份证号] from sheet1 group by [身份证号] having count(*)>1
)
) as tb order by tb.[身份证号]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: