紧急问题

suxiaoguai 2001-12-17 12:28:36
select Face from Property where Face = null
没有任何记录
select Face from Property where Face=''
有7180条记录
delete from Property where Face='' 出错 提示为“所有记录中均未找到搜索关键字”
delete from Property where Face =null 可以删除为0条记录
update Property set Face='no' where Face='' 可以运行 提示7180条记录更新
delete from Property where Face='no' 出错提示 “所有记录中均未找到搜索关键字”
高手快帮我吧
我真搞不懂为什么啊

跟下面为同个问题
----------------------------
救命!!为什么我在Access里删除数据 有的字段条件可以删除有的条件出错提示“所有记录中均未找到搜索关键字” 救命啊!!!!!!
比如说:
delete from Property where City = '' 可以删除

delete from Property where Face = '' 就提示出错

该数据库是别人定义的 我不知道是什么原因 现在做到这里就卡住了 快请各位大侠救命
...全文
65 6 打赏 收藏 转发到动态 举报
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
itmouse 2001-12-17
  • 打赏
  • 举报
回复
是什么数据库?
ACCESS , SQL Server Or Else ?
Bardo 2001-12-17
  • 打赏
  • 举报
回复
delete from Property where isnull( Face , '')
可以将 NULL 替换成你要的值(这里是'')! 就可以查找.

SELECT * from Property where 1=0
可以方便地返回空记录集
烟灰 2001-12-17
  • 打赏
  • 举报
回复
select * from Property where Face is null or Face =''


sql ="delete from Property where Face=''"
cn.Execute sql
sxmzmxh 2001-12-17
  • 打赏
  • 举报
回复
改成 delete from Property where [Face]=''
你的Face是字符型的吗?
suxiaoguai 2001-12-17
  • 打赏
  • 举报
回复
 lcooky(今夜无雪) 回复于2001-12-17 10:47:21
可能不是'',而是NULL,那就这样写delete from Property where Face = null
 fraser01(王晓栋) 回复于2001-12-17 10:50:02
Face is null
 suxiaoguai(suxiaoguai) 回复于2001-12-17 10:54:54
lcooky(今夜无雪):
改为 delete from Property where Face = null是可以了
可我 delete from Property where Face = '' 只是举个例子我真整想要的是
delete from Property where Face not in ('东','南','西','北','东北','东南','西北','西南') 提示出错

可是
delete from Property where PropertyType not in ('住宅','写字楼','商铺','其他') 运行通过 天那怎么回事?
 suxiaoguai(suxiaoguai) 回复于2001-12-17 10:57:17
“所有记录中均未找到搜索关键字”
到底是什么东西 我开始还以为是 access不支持 not in 语法害我测试了半天后来 随便找了另外一个字段 却通过了 我真搞不懂
 xym1234567890(好孩子) 回复于2001-12-17 11:12:03
好像还是null问题,Face 字段允许为空值,试试delete from Property where Face in ('东','南','西','北','东北','东南','西北','西南')就知道了,改一下数据库,允许空字符串为否,把null都改成"".
 wj_he(大江东去) 回复于2001-12-17 11:30:27
如果字段内容不是NULL,那你把“=”改为“LIKE”试试看,不过LIKE后边的查询关键字得改一下了。
 suxiaoguai(suxiaoguai) 回复于2001-12-17 11:31:59
xym1234567890(好孩子):
delete from Property where Face in ('东','南','西','北','东北','东南','西北','西南') 运行通过
按照你的方法也可以

可我的数据库是别人的啊 我怎么有可能去改变别人的数据库
有什么其他解决方法吗?
suxiaoguai 2001-12-17
  • 打赏
  • 举报
回复
是 ACCESS 数据库
相关推荐

7,704

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告