<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:Arial;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-GB link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'>And even that is’nt correct, of
course you can reference nextval etc from dual in a cursor ( just in case I
might have mislead a newcomer to the list </span></font><font color=blue
face=Wingdings><span style='font-family:Wingdings;color:blue'>L</span></font><font
color=blue face=Arial><span style='font-family:Arial;color:blue'> ).<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Joe Boyle [mailto:atla38@dsl.pipex.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 31 July 2007 19:00<br>
<b><span style='font-weight:bold'>To:</span></b> 'Daniel Rodríguez'<br>
<b><span style='font-weight:bold'>Cc:</span></b> 'powerh-l@lists.sowder.com'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: Nested SELECT
expresions in DECLARE CURSOR</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'>Many appologies, for some reason I thought
you were processing sequence calls </span></font><font color=blue
face=Wingdings><span style='font-family:Wingdings;color:blue'>J</span></font><font
color=blue face=Arial><span style='font-family:Arial;color:blue'><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=3 color=blue face=Arial><span style='font-size:
12.0pt;font-family:Arial;color:blue'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;font-weight:bold'>From:</span></font></b><font
size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
Daniel Rodríguez [mailto:reasegurator@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 31 July 2007 18:55<br>
<b><span style='font-weight:bold'>To:</span></b> Joe Boyle<br>
<b><span style='font-weight:bold'>Cc:</span></b> powerh-l@lists.sowder.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: Nested SELECT expresions
in DECLARE CURSOR</span></font><span lang=EN-US><o:p></o:p></span></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hi Joe,<br>
<br>
I used the DUAL table as a general example.<br>
<br>
If I declare a CURSOR with the expresion "SELECT 1 from DUAL", it
works so that's not the problem. <br>
<br>
Thank you,<br>
<br>
Dani<br>
<br>
<o:p></o:p></span></font></p>
<div>
<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>2007/7/31, Joe Boyle <<a
href="mailto:atla38@dsl.pipex.com">atla38@dsl.pipex.com</a>>:</span></font></span><o:p></o:p></p>
<div link=blue vlink=purple>
<div>
<p><font size=3 color=blue face=Arial><span style='font-size:12.0pt;font-family:
Arial;color:blue'>I suspect that dual is'nt known by PH and you have to return
values from DUAL via a stored procedure call.</span></font><o:p></o:p></p>
<p><font size=3 color=blue face=Arial><span style='font-size:12.0pt;font-family:
Arial;color:blue'> </span></font><o:p></o:p></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span lang=EN-US style='font-size:12.0pt'>
<hr size=2 width="100%" align=center>
</span></font></div>
<p><b><font size=2 face=Tahoma><span lang=EN-US style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span lang=EN-US style='font-size:10.0pt;font-family:Tahoma'>
powerh-l-bounces+atla38=<a href="mailto:dsl.pipex.com@lists.sowder.com"
target="_blank">dsl.pipex.com@lists.sowder.com</a> [mailto:<a
href="mailto:powerh-l-bounces+atla38=dsl.pipex.com@lists.sowder.com"
target="_blank">powerh-l-bounces+atla38=dsl.pipex.com@lists.sowder.com</a>] <b><span
style='font-weight:bold'>On Behalf Of </span></b>Daniel Rodríguez<br>
<b><span style='font-weight:bold'>Sent:</span></b> 31 July 2007 18:45<br>
<b><span style='font-weight:bold'>To:</span></b> <a
href="mailto:powerh-l@lists.sowder.com" target="_blank">powerh-l@lists.sowder.com</a><br>
<b><span style='font-weight:bold'>Subject:</span></b> Nested SELECT expresions
in DECLARE CURSOR</span></font><o:p></o:p></p>
</div>
<div><span id="q_1141d656b3739aa6_1">
<p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
<p style='margin-bottom:12.0pt'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Hi all,<br>
<br>
In Oracle I'm able to use nested selects like this one:<br>
<br>
<i><span style='font-style:italic'>select 1 as one, (select 2 from dual d) as
two<br>
from dual<br>
</span></i><br>
When I try to do it in a screen I get the following message:<br>
<br>
<i><span style='font-style:italic'>screen kk<br>
sql in sgtompla &<br>
declare csr_example cursor for & <br>
select 1 , (select 2 from dual d)&<br>
from dual<br>
<br>
cursor csr_example primary occurs 12<br>
<font color=red><span style='color:red'>*E* Error parsing SQL statement.<br>
DMS-E-GENERAL, A general exception has occurred during operation 'prepare
request'.<br>
</span></font> access sequential<br>
</span></i><br>
It is possible to use this expresion or I'm missing something. <br>
<br>
<br>
Best regards,<br>
<br>
Daniel Rodriguez<o:p></o:p></span></font></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</span></div>
</body>
</html>