1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link 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 message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Combine 2 SQL tables.

Discussion in 'Command Line Administrator Client' started by tsmlover, Aug 29, 2011.

  1. tsmlover

    tsmlover New Member

    Joined:
    Oct 14, 2008
    Messages:
    390
    Likes Received:
    1
    How to combine 2 different SQL tabels

    i.e. select nodes.node_name, events.result from events,nodes

    I want to combine events and nodes table together to gather plateform_name information from Nodes table and backup status information from Events table

    i have tsm 6.1,


    does any one did this thing ....

    Thanks
     
  2.  
  3. domino

    domino Senior Member

    Joined:
    Nov 16, 2005
    Messages:
    718
    Likes Received:
    32
    Occupation:
    System Engineer
    Location:
    Germany
  4. tsmlover

    tsmlover New Member

    Joined:
    Oct 14, 2008
    Messages:
    390
    Likes Received:
    1
    I already browse thru that website but i didnt find my answer I need to run this script

    select events.node_name,events.status,events.result,events.actual_start,nodes.platform_name from events events, nodes nodes where events.node_name=nodes.node_name order by events.node_name,events.status,events.result,events.actual_start,nodes.platform_name

    but its not working ..
     
  5. ChrisRees

    ChrisRees Senior Member

    Joined:
    Jul 24, 2008
    Messages:
    537
    Likes Received:
    13
    Occupation:
    Storage Management Person
    Location:
    Birmingham, UK
    Hi.

    You have a space on the first line and last line event s.actual_start

    It works for me on TSM 5.5.4

    What error do you get when you run it ?

    Cheers
     
  6. tsmlover

    tsmlover New Member

    Joined:
    Oct 14, 2008
    Messages:
    390
    Likes Received:
    1
    yes the script is working with 5.5 but on 6.1 it gives me the below error.....

    select events.node_name,events.status,events.result,events.actual_start,nodes.platform_name from events events, nodes nodes where events.node_name=nodes.node_name order by events.node_name,events.status,events.result,events.actual_start,nodes.platform_name
    ANR0162W Supplemental database diagnostic information: -1:42S22:-206 ([IBM][CLI Driver][DB2/AIX64] SQL0206N "NODES.NODE_NAME" is not valid in the context where it is used.
    SQLSTATE=42703
    ).
    ANR2940E The command 'select events.node_name , events.status , events.result , events.actual_start , nodes.platform_name from events events , NODESVIEW NODESVIEW where
    events.node_name = nodes.node_name order by events.node_name , events.status , events.result , events.actual_start , nodes.platform_name ' contains an unknown SQL column name.
    ANS8001I Return code 3.
     

Share This Page