Nested SELECT expresions in DECLARE CURSOR

Joe Boyle atla38 at dsl.pipex.com
Tue Jul 31 13:00:10 CDT 2007


Many appologies, for some reason I thought you were processing sequence
calls :-)

 

  _____  

From: Daniel Rodríguez [mailto:reasegurator at gmail.com] 
Sent: 31 July 2007 18:55
To: Joe Boyle
Cc: powerh-l at lists.sowder.com
Subject: Re: Nested SELECT expresions in DECLARE CURSOR

 

Hi Joe,

I used the DUAL table as a general example.

If I declare a CURSOR with the expresion "SELECT 1 from DUAL", it works so
that's not the problem. 

Thank you,

Dani




2007/7/31, Joe Boyle <atla38 at dsl.pipex.com>:

I suspect that dual is'nt known by PH and you have to return values from
DUAL via a stored procedure call.

 

  _____  

From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Daniel Rodríguez
Sent: 31 July 2007 18:45
To: powerh-l at lists.sowder.com
Subject: Nested SELECT expresions in DECLARE CURSOR

 

Hi all,

In Oracle I'm able to use nested selects like this one:

select 1 as one, (select 2 from dual d) as two
 from dual

When I try to do it in a screen I get the following message:

screen kk
sql in sgtompla &
 declare csr_example cursor for & 
select 1 , (select 2 from dual d)&
 from dual
 
 cursor csr_example primary occurs 12
*E* Error parsing SQL statement.
DMS-E-GENERAL, A general exception has occurred during operation 'prepare
request'.
  access sequential

It is possible to use this expresion or I'm missing something. 


Best regards,

Daniel Rodriguez

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20070731/c7c7e6f8/attachment.html


More information about the powerh-l mailing list