• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

SQL statement

TaSMania

ADSM.ORG Member
#1
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
 

marclant

ADSM.ORG Moderator
#2
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.
 

TaSMania

ADSM.ORG Member
#3
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
 

moon-buddy

ADSM.ORG Moderator
#4
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
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 9 22.0%
  • Keep using TSM for Spectrum Protect.

    Votes: 20 48.8%
  • Let's be formal and just say Spectrum Protect

    Votes: 8 19.5%
  • Other (please comement)

    Votes: 4 9.8%

Forum statistics

Threads
31,022
Messages
132,086
Members
21,267
Latest member
andyh2468
Top