ADSM-L

Re: not like underscore

2002-11-12 17:08:13
Subject: Re: not like underscore
From: Kai Hintze <kai.hintze AT ALBERTSONS DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 12 Nov 2002 12:19:05 -0800
Unfortunately getting the node names is only the first part. Where I am
really heading is something like:

select node_name, sum(capacity) as "MB available", sum(capacity * pct_util /
100) as "MB used" from filespaces where (cast(days(current_date) -
days(backup_end)) as integer < 5) and node_name not like '%_%' group by
node_name

But first I have to find out how to exclude node names with underscores.

- Kai.

-----Original Message-----
From: Cook, Dwight E
To: 'kai.hintze AT ALBERTSONS DOT COM'
Sent: 11/12/02 11:47 AM
Subject: RE: not like underscore

Well,
        q node *_*
works...???

Dwight



-----Original Message-----
From: Kai Hintze [mailto:kai.hintze AT ALBERTSONS DOT COM]
Sent: Tuesday, November 12, 2002 12:16 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: not like underscore


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>