在WHERE CLAUSE中替换 [英] REPLACE in WHERE CLAUSE

查看:68
本文介绍了在WHERE CLAUSE中替换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




请告知我们是否可以在MS Access中实现以下查询。


我尝试过 ; " (双引号)也在替换。这对我没有帮助。


SELECT * FROM dbo_Facility WHERE(REPLACE(REPLACE(REPLACE(NAME,'','',''''),''。' '''''''''''''''''''''''''''''''''''''}

谢谢

Jambai

Hi,

Please let me know is it possible to achieve the below query in MS Access.

I have tried with " " (double quote) also in the replace. it doesn''t help me.

SELECT * FROM dbo_Facility WHERE (REPLACE(REPLACE(REPLACE(NAME,'','',''''),''.'',''''),'''''''' ,'''') LIKE ''jambai %'')

Thanks
Jambai

推荐答案





请告诉我的是可以在MS Access中实现以下查询。


我试过 " (双引号)也在替换。这对我没有帮助。


SELECT * FROM dbo_Facility WHERE(REPLACE(REPLACE(REPLACE(NAME,'','',''''),''。' '''''''''''''''''''''''''''''''''''''}

谢谢

Jambai
Hi,

Please let me know is it possible to achieve the below query in MS Access.

I have tried with " " (double quote) also in the replace. it doesn''t help me.

SELECT * FROM dbo_Facility WHERE (REPLACE(REPLACE(REPLACE(NAME,'','',''''),''.'',''''),'''''''' ,'''') LIKE ''jambai %'')

Thanks
Jambai



向我展示你的tbl的一些数据和描述

show me some data and description of thy tbl


除非这是一个直通查询,你需要改变%到*这是Access中的通配符。


替换功能看起来没问题,但是我会把NAME放在方括号中,你的右括号位于错误的位置。试试这个...

Unless this is a pass thru query you will need to change % to * which is the wildcard in Access.

Replace function looks ok but I would put NAME in square brackets and your closing bracket is in the wrong place. Try this ...

展开 | 选择 | Wrap | 行号



除非这个是一个直通查询,您需要将%更改为*,这是Access中的通配符。


替换功能看起来没问题,但我会将NAME放在方括号中,并且您的右括号是错误的地方。试试这个...

Unless this is a pass thru query you will need to change % to * which is the wildcard in Access.

Replace function looks ok but I would put NAME in square brackets and your closing bracket is in the wrong place. Try this ...

展开 | 选择 | Wrap | 行号


这篇关于在WHERE CLAUSE中替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆