在查询字符串中使用NOT LIKE ???? [英] Using NOT LIKE in Query String????

查看:111
本文介绍了在查询字符串中使用NOT LIKE ????的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我知道如何使用[field LIKE''%keyword%'']来提取

包含关键字的所有记录,但是不包含关键字呢?我已经尝试了

不喜欢但是我得到了


参数类型错误,超出可接受的范围,或者在

彼此冲突


有什么想法吗?

谢谢!


-

David Lozzi

Associated Business&技术组
www.associatedbtg.com


我应该知道......但我有一个大脑放屁。

OK, I know how to use [field LIKE ''%keyword%''] to pull up all records that
contains the keyword, but what about not containing the keyword? I''ve tried
NOT LIKE but i get

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another

Any ideas?
Thanks!

--
David Lozzi
Associated Business & Technology Group
www.associatedbtg.com

I should''ve known that....but I had a brain fart.

推荐答案

SELECT [whatever] FROM [whatever]什么[不管]不喜欢''%不管%''


发布您的SQL字符串以及您的数据库类型和信息。


Ray at工作


" David Lozzi" < DL **** @ associatedbtg.com>在消息中写道

新闻:或者************* @ TK2MSFTNGP10.phx.gbl ...
SELECT [whatever] FROM [whatever] WHERE [whatever] NOT LIKE ''%whatever%''

Post your SQL string and your database type and info.

Ray at work

"David Lozzi" <dl****@associatedbtg.com> wrote in message
news:OR*************@TK2MSFTNGP10.phx.gbl...
好的,我知道如何使用[field LIKE''%keyword%'']来提取
包含关键字的所有记录,但是不包含关键字呢?我已经尝试了不喜欢但是我得到了

参数类型错误,超出可接受的范围,或者彼此冲突

任何想法?
谢谢!

-
David Lozzi
Associated Business&技术组
www.associatedbtg.com

我我应该知道......但我有一个大脑放屁。
OK, I know how to use [field LIKE ''%keyword%''] to pull up all records that
contains the keyword, but what about not containing the keyword? I''ve tried NOT LIKE but i get

Arguments are of the wrong type, are out of acceptable range, or are in
conflict with one another

Any ideas?
Thanks!

--
David Lozzi
Associated Business & Technology Group
www.associatedbtg.com

I should''ve known that....but I had a brain fart.



是的,我明白了。尝试不喜欢的时候我也会得到同样的错误。你为什么这样做这么做?


雷在工作


David Lozzi < DL **** @ associatedbtg.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
Yes, I see. I also get the same error when trying NOT like. Why are you
doing this like this?

Ray at work

"David Lozzi" <dl****@associatedbtg.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我明白了。我正在使用记录集的过滤器选项。我只是用我自己的信息加载
记录集,这不是从
数据库中提取的......就像这样:

set rec = server.CreateObject(" ADODB.Recordset")
rec.CursorLocation = 3
rec.Fields.Append" user",adVarChar,255
rec.Fields.Append" supervisor",adVarChar,255
........
rec.Fields.Append" HazardDate",adDate
rec.Fields.Append" OSHA",adVarChar,10
rec.Open
rec.filter = filt
如果NOT LIKE用于SQL查询,这个场景是否有选项?

谢谢,

> -
David Lozzi
Associated Business&技术组
www.associatedbtg.com
I see. I am using the filter option of the recordset. I am just loading the recordset with my own information, this is not being pulled from a
database... like this:

set rec = server.CreateObject("ADODB.Recordset")
rec.CursorLocation = 3
rec.Fields.Append "user", adVarChar, 255
rec.Fields.Append "supervisor", adVarChar, 255
........
rec.Fields.Append "HazardDate", adDate
rec.Fields.Append "OSHA", adVarChar, 10
rec.Open
rec.filter = filt

if NOT LIKE is used for SQL queries, is there an option for this scenario?

thanks,

--
David Lozzi
Associated Business & Technology Group
www.associatedbtg.com



我找不到任何明确的声明,表明在RS的过滤方法中不支持

,但我确实看到其他人有
万维网上没有任何解决方案的
问题。嗯。也许有人

其他人已经阅读了这个帖子,可以启发我们。


雷在工作


" ; David Lozzi < DL **** @ associatedbtg.com>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
I cannot find any definitive statement indicating that NOT like is not
supported in the filter method of an RS, but I do see others having the
problems without any solutions, out there on the WWW. Hmm. Perhaps someone
else has read this thread this far and can enlighten us.

Ray at work

"David Lozzi" <dl****@associatedbtg.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我明白了。我正在使用记录集的过滤器选项。我只是用我自己的信息加载
记录集,这不是从
数据库中提取的......就像这样:

set rec = server.CreateObject(" ADODB.Recordset")
rec.CursorLocation = 3
rec.Fields.Append" user",adVarChar,255
rec.Fields.Append" supervisor",adVarChar,255
........
rec.Fields.Append" HazardDate",adDate
rec.Fields.Append" OSHA",adVarChar,10
rec.Open
rec.filter = filt
如果NOT LIKE用于SQL查询,这个场景是否有选项?

谢谢,

> -
I see. I am using the filter option of the recordset. I am just loading the recordset with my own information, this is not being pulled from a
database... like this:

set rec = server.CreateObject("ADODB.Recordset")
rec.CursorLocation = 3
rec.Fields.Append "user", adVarChar, 255
rec.Fields.Append "supervisor", adVarChar, 255
........
rec.Fields.Append "HazardDate", adDate
rec.Fields.Append "OSHA", adVarChar, 10
rec.Open
rec.filter = filt

if NOT LIKE is used for SQL queries, is there an option for this scenario?

thanks,

--



这篇关于在查询字符串中使用NOT LIKE ????的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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