悬赏园豆:10
[已关闭问题]
关闭于 2008-07-02 16:21
<P>请问下面这段SQL中的存储过程变成oracle中应该怎么写?</P>
<DIV class=cnblogs_code><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">select</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #008000">@TmpSelect</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000"> </SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">set nocount on;set rowcount @SPintRowCount;select @SPintBeginID = </SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #008000">@a_SelectOrderId</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000"> from </SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #008000">@a_TableName</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000"> </SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #008000">@a_SelectWhere</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000"> </SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #808080">+</SPAN><SPAN style="COLOR: #008000">@a_SelectOrder</SPAN><SPAN style="COLOR: #000000"><BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top> </SPAN><SPAN style="COLOR: #0000ff">execute</SPAN><SPAN style="COLOR: #000000"> sp_executesql <BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top> </SPAN><SPAN style="COLOR: #008000">@TmpSelect</SPAN><SPAN style="COLOR: #000000">,<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top> N</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">@SPintRowCount int,@SPintBeginID int OUTPUT</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">,<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top> </SPAN><SPAN style="COLOR: #008000">@SPintRowCount</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #008000">@intRowCount</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #008000">@SPintBeginID</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #008000">@intBeginID</SPAN><SPAN style="COLOR: #000000"> OUTPUT</SPAN></DIV>