ADSM-L

SQL select subquery

1999-07-22 08:21:43
Subject: SQL select subquery
From: Carsten Moldrup <cmoldrup AT CSC DOT DK>
Date: Thu, 22 Jul 1999 14:21:43 +0200
Hi

I am trying to do a SELECT FROM subquery...... which wont work.
ADSM does not like the () in this sql - removing them gives an ANR2904E
Unexpected SQL key word token - 'SELECT'.
Any ideas ?   ADSM server is 3.1.2.20 on MVS.

Regards, Carsten Moldrup

here's the sql...

select -
       table1.node_name  -
      ,table1.platform_name     -
      ,table2.fs as "Filespaces" -
      ,table2.mb as "MB Capacity"  -
from -
       nodes as "table1"  -
      ,( -
        select  -
               node_name -
              ,count(*) as "fs"  -
              ,sum(capacity) as "mb"  -
        from -
               filespaces -
        group by node_name -
       ) -
         as "table2"
where -
       table2.node_name=table1.node_name -
order by 2,1
<Prev in Thread] Current Thread [Next in Thread>