ADSM-L

Re: How do you create an outer join with the SELECT command?

1999-12-09 16:38:32
Subject: Re: How do you create an outer join with the SELECT command?
From: Nathan King <nathan.king AT USAA DOT COM>
Date: Thu, 9 Dec 1999 15:38:32 -0600
My SQL is pretty rusty, but it's my understanding that outer joins are
usually performed using UNION statements which I believe are not supported
within the ADSM SQL Interface.
Nathan

        -----Original Message-----
        From:   Chris Mawdsley [SMTP:Chris_Mawdsley AT MANULIFE DOT COM]
        Sent:   Thursday, December 09, 1999 10:53 AM
        To:     ADSM-L AT VM.MARIST DOT EDU
        Subject:        SQL: How do you create an outer join with the SELECT
command?

        Greetings sagacious ones.

        For the purpose of this question, I am trying to create a LEFT OUTER
JOIN on two
        tables.
        Specifically,  I want to list all the node names from the NODES
table as well as
        the schedule names
        for the nodes that have schedules from ASSOCIATIONS.

        I have tried as many variations as I can think of.

        SELECT NODES.NODE_NAME, SCHEDULE_NAME FROM NODES, ASSOCIATIONS WHERE
\
        NODES.NODE_NAME = ASSOCIATIONS.NODE_NAME
        returns only the node names that are in ASSOCIATIONS.

        SELECT NODES.NODE_NAME, ASSOCIATIONS.SCHEDULE_NAME \
        FROM NODES LEFT JOIN ASSOCIATIONS ON NODES.NODE_NAME =
ASSOCIATIONS.NODE_NAME
        returns:
        ANR2905E Unexpected SQL identifier token - 'JOIN'.
                                              |

.............................V.................................
                 chedule_name from nodes left join associations on
nodes.node_na

        SELECT NODES.NODE_NAME, SCHEDULE_NAME FROM NODES, ASSOCIATIONS WHERE
\
        NODES.NODE_NAME = ASSOCIATIONS.NODE_NAME (+)
        returns
        ANR2908E Unexpected SQL punctuation token - '('.

|

............................................................V..
                  associations where nodes.node_name =associations.node_name
(+)

        SELECT NODES.NODE_NAME, SCHEDULE_NAME FROM NODES, ASSOCIATIONS WHERE
\
        NODES.NODE_NAME *= ASSOCIATIONS.NODE_NAME
        returns
        ANR2907E Unexpected SQL operator token - '='.
                                                         |

........................................V......................
                 es, associations where nodes.node_name
*=associations.node_name

        You get the idea.  If anyone knows how to make this work, I would
appreciate
        knowing how.
        TIA,

        Chris Mawdsley
        Y2K Infrastructure - UNIX
        (519) 747-7000 X8192
        When the solution is simple, God is answering - Albert Einstein


        Chris Mawdsley
        Y2K Infrastructure - UNIX
        (519) 747-7000 X8192
        When the solution is simple, God is answering - Albert Einstein
<Prev in Thread] Current Thread [Next in Thread>
  • Re: How do you create an outer join with the SELECT command?, Nathan King <=