not like underscore
2002-11-12 13:18:06
Oh wiseness of wizards of tsm-flavored SQL, how do you match an underscore?
I need to find node names that do not contain an underscore ('_'). I thought
that would be no problem, just "select node_name from nodes where node_name
not like '%_%'", but that doesn't find anything. A bit more research
revealed that '_' is the single character match, so that expression parsed
out to something like "select node_names without any characters". Not what I
wanted at all.
I've played with a couple of things to escape the underscore, but I haven't
found anything that works yet. I thought I remembered reading something
about match and wildcards in this list, but all I can find in the archives
is the mention that underscore is the single character wildcard.
If I can't find an answer fairly quickly I will just dump everything to a
file and parse out the results with perl or something, but I really think
what I need to do could be done easily in SQL if I could just parse out the
underscore.
I thank you in advance for any light you could shed on my difficulty.
- Kai.
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- not like underscore,
Kai Hintze <=
|
|
|