ADSM-L

Re: Antwort: SQL select subquery

1999-07-23 04:25:25
Subject: Re: Antwort: SQL select subquery
From: Rainer Holzinger <Rainer.Holzinger AT DOMINO.HAINDL DOT DE>
Date: Fri, 23 Jul 1999 10:25:25 +0200
Hi all,

I do the following select from within a shell script and it works fine.

select stgpool_name,status,access from volumes
where stgpool_name in
(select stgpool_name from stgpools where pooltype='COPY')
and access='OFFSITE' and status in ('EMPTY','FILLING')

In this query the second (inner) select statement is processed first and
the resuslt is passed to the first (outer) select.

Hope this will help.

kind regards
Rainer

---------------------- Weitergeleitet von Rainer Holzinger/HAINDL am
23.07.99 10:21 ---------------------------
23.07.99 10:21 ---------------------------


Carsten Moldrup <cmoldrup AT CSC DOT DK> am 22.07.99 19:08:31

Bitte antworten an "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>

An:   ADSM-L AT VM.MARIST DOT EDU
Kopie:     (Blindkopie: Rainer Holzinger/HAINDL)

Thema:    Re: Antwort: SQL select subquery




Hi

Thanks for your replies.

Doing a HELP SELECT in admin cmd line tells that a subquery is valid.
I tried with a little more simple sql - with the same result :

adsm> select * from select node_name from nodes
ANR2904E Unexpected SQL key word token - 'SELECT'.

                       |
         ..............V..........................
         select * from select node_name from nodes

ANS8001I Return code 3.

adsm>

...and.........

adsm> select * from (select node_name from nodes)
ANR2908E Unexpected SQL punctuation token - '('.

                       |
         ..............V............................
         select * from (select node_name from nodes)

ANS8001I Return code 3.

adsm>


IBM, are select subqueries not valid ???

Regards, Carsten Moldrup
<Prev in Thread] Current Thread [Next in Thread>