gs99
asked on
Is there a way to indicate NOT Like to exclude rows?
I have this line of code that includes rows if value SA is found:
SqlMethods.Like(h.hierarch y_string, "%" & SA & "%")
I would like to add another similar criteria that Excludes rows if the value is found.
SqlMethods.Like(h.hierarch
I would like to add another similar criteria that Excludes rows if the value is found.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry for the delay.
Your suggestion works OK.
Thanks for your help.
Your suggestion works OK.
Thanks for your help.
ASKER
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?
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?
ok great you solved
Have you try to use LIKE operator?
h.hierarchy_string NOT LIKE "*" & SA & "*"