473,473 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Does not contain ISSUE

38 New Member
Hi All!

I have a field named: Title,now I want to filter the data with a specific match.
In Excel when you set the whole sheet1 to data>filter>autofilter, excel offers an Custom AutoFilter window
where you can select various condition. I noticed that one of the choices is the does not contain option
I was wondering is this possible to use in sql, aside from LIKE and BETWEEN bec. I'm dealing with long titles and
would like to include the condition:
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM Table1
  3. WHERE Table1.Title does not contain = jkl 
thanks in advance!
Apr 24 '08 #1
2 5279
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi cephal0n. There is more than one way to do this. One way is to use the following negated Like condition:
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM Table1
  3. WHERE Table1.Title Not Like "*sometext*"
The wildcard characters ("*") are necessary for Like to find the characters anywhere in the string.

If you wanted to have an Access query which pops up a message box to ask the user what text to exclude you can include a parameter within the query criterion on the Title field:
Expand|Select|Wrap|Line Numbers
  1. Not Like "*" & [Enter text to exclude] & "*"
-Stewart
Apr 24 '08 #2
cephal0n
38 New Member
hi Stewart!

Thank you very much for answering! everything seems to make sense now :)
Apr 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Josh | last post by:
I've just installed PHP on an IIS 5/W2K server. The installation was succesful, as I can load a test.php file in the first website I setup for PHP. However, the second website I setup for PHP...
4
by: Arjen | last post by:
What does this mean? 'Roles' does not contain a definition for 'RoleExists' I'm doing this: using System.Web.Security; Roles.DeleteRole(txtRolename.Text.Trim()); I don't see what's wrong. ...
1
by: | last post by:
Hi, I am using RC.exe to compile a resource file. The source file contains version info which is missing from the output file. The file included in the resource file is shown below : ...
1
by: smith | last post by:
I was recently set to release an app that used very common single instance code and hit the oddest issue. After many hours of full build tests I believe that it is duplicatable. Environment: ...
3
by: Brian | last post by:
Hope someone can help ..... Have a function which creates a HTML HREF function fLink(aText) { return '<a href=javascript:DoLinkSearch("'+aText+'")>'+aText+'</a>'; } If the parameter value is...
15
by: amit.man | last post by:
Hi, i have newbie qestion, when i write #include <somthing.h> the precompiler subtitue that line with the lines from "somthing.h" header file. when, where and how the compiler insert the...
2
by: Mikus Sleiners | last post by:
I have a control - textBox1 that is binded to objects propery - "Currency" and another control - textBox2 (read only) that is also binded to same propery. Now, i have a situation where textbox1...
17
by: Michael Reichenbach | last post by:
Here is the example code. int main(int argc, char *argv) { string Result; WIN32_FIND_DATA daten; HANDLE h = FindFirstFile(TEXT("c://test"), &daten); system("PAUSE"); return EXIT_SUCCESS; }
1
by: Kyle Morris | last post by:
so the challenge is how to create a regex that validates a control when it doesnt contain particular words or phrases. I've used the validator plenty of times to validate correct input in...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.