<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: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:purple;
        text-decoration:underline;}
span.EmailStyle17
        {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=purple>
<div class=Section1>
<p class=MsoNormal><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.<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'>
powerh-l-bounces+atla38=dsl.pipex.com@lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com@lists.sowder.com] <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> powerh-l@lists.sowder.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> 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 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<br>
<br>
<o:p></o:p></span></font></p>
</div>
</body>
</html>