Solved

Is there a way to indicate NOT Like to exclude rows?

Posted on 2011-03-25
5
249 Views
Last Modified: 2012-08-14
I have this line of code that includes rows if value SA is found:
SqlMethods.Like(h.hierarchy_string, "%" & SA & "%")

I would like to add another similar criteria that Excludes rows if the value is found.

0
Comment
Question by:gs99
  • 2
  • 2
5 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 125 total points
ID: 35220513
Have you tried:

Not SqlMethods.Like(h.hierarchy_string, "%" & SA & "%")

Open in new window

0
 
LVL 13

Expert Comment

by:gamarrojgq
ID: 35220533
Hi,

Have you try to use LIKE operator?  

h.hierarchy_string NOT LIKE "*" & SA & "*"
0
 

Author Closing Comment

by:gs99
ID: 35245208
Sorry for the delay.
Your suggestion works OK.

Thanks for your help.
0
 

Author Comment

by:gs99
ID: 35245236
To gamarrojgg:
I could not get your solution to work.
h.hierarchy_string NOT LIKE "*" & SA & "*"
The NOT was not accepted for some reason.

but the solution from kaufmed does work in my case.

thanks for your suggestion; it may work for somebody else?
0
 
LVL 13

Expert Comment

by:gamarrojgq
ID: 35245250
ok great you solved
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Programmatically signing Word macros 4 72
Help with sorting data in Listbox using VB.NET 3 60
vb.net help 4 27
Help with adding DLL file in Windows project 20 27
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now