1. Please help support our sponsors by considering their products and services.
    Our sponsors enable us to maintain high-speed Internet connection and fast webservers.
    They support this free information and knowledge exchange forum service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions

SQL statement

Discussion in 'Scripting' started by TaSMania, Jun 8, 2017.

  1. TaSMania

    TaSMania ADSM.ORG Member

    Joined:
    Nov 17, 2015
    Messages:
    75
    Likes Received:
    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.
     
  2.  
  3. marclant

    marclant ADSM.ORG Moderator

    Joined:
    Jun 16, 2006
    Messages:
    2,714
    Likes Received:
    376
    Occupation:
    Accelerated Value Specialist for Spectrum Protect
    Location:
    Canada
    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.
     
  4. TaSMania

    TaSMania ADSM.ORG Member

    Joined:
    Nov 17, 2015
    Messages:
    75
    Likes Received:
    1
    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
     
  5. moon-buddy

    moon-buddy ADSM.ORG Moderator

    Joined:
    Aug 24, 2005
    Messages:
    6,887
    Likes Received:
    367
    Occupation:
    Electronics Engineer, Security Professional
    Location:
    Somewhere in the US
    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
     
  6. TaSMania

    TaSMania ADSM.ORG Member

    Joined:
    Nov 17, 2015
    Messages:
    75
    Likes Received:
    1
    thanks that worked
     

Share This Page