SQL statement

TaSMania

ADSM.ORG Member
Joined
Nov 17, 2015
Messages
126
Reaction score
1
Points
0
PREDATAR Control23

Not sure if this is the correct thread or subject.

I need help with gathering info using sql statement.

Node name: ve_vcenter001
Filespace: *****old 'any name ending with old

below is what I have but it is not working.
select filespaces.node_name,filespaces.filespace_name from filespaces,occupancy where filespaces.filespace_name like '%old' and occupancy.node_name=ve_vcenter001 > /tmp/oldorphan.txt
 
PREDATAR Control23

The nodename needs to be all in UPPERCASE, and it's string, not a number, so it also needs to be between single quotes like the filespace_name.
 
PREDATAR Control23

Like this?
Code:
select filespaces.node_name,filespaces.filespace_name from filespaces,occupancy where [B]upper[/B] filespaces.filespace_name like [B]'%OLD'[/B] and [B]upper[/B] occupancy.node_name=[B]'VE_VCENTER001'[/B] > /tmp/oldorphan.txt
select filespaces.node_name,filespaces.filespace_name from filespaces,occupancy where upper filespaces.filespace_name like '%OLD' and upper occupancy.node_name='VE_VCENTER001' > /tmp/oldorphan.txt
 
PREDATAR Control23

select filespaces.node_name,filespaces.filespace_name from filespaces,occupancy where filespaces.filespace_name like '%OLD' and occupancy.node_name='VE_VCENTER001' > /tmp/oldorphan.txt
 
Top