首页 新闻 会员 周边 捐助

sql存储过程翻译成oracle的问题

0
悬赏园豆: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">&nbsp;</SPAN><SPAN style="COLOR: #008000">@TmpSelect</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">set&nbsp;nocount&nbsp;on;set&nbsp;rowcount&nbsp;@SPintRowCount;select&nbsp;@SPintBeginID&nbsp;=&nbsp;</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">&nbsp;from&nbsp;</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">&nbsp;</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">&nbsp;</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>&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #0000ff">execute</SPAN><SPAN style="COLOR: #000000">&nbsp;sp_executesql&nbsp;<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN style="COLOR: #008000">@TmpSelect</SPAN><SPAN style="COLOR: #000000">,<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;N</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #ff0000">@SPintRowCount&nbsp;int,@SPintBeginID&nbsp;int&nbsp;OUTPUT</SPAN><SPAN style="COLOR: #ff0000">'</SPAN><SPAN style="COLOR: #000000">,<BR><IMG src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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">&nbsp;OUTPUT</SPAN></DIV>
kyjack-chuang的主页 kyjack-chuang | 初学一级 | 园豆:170
提问于:2008-06-18 16:42
< >
分享
所有回答(1)
0
1、将“@”换成“:”; 2、将“+”换成“||”; 3、执行完上述内容后,如果还有错误就是某些关键字或函数的错误,理解Sql中这些关键字或函数的意思后,再到Oracle中找到相应的关键字或函数就可以了!
刚刚 | 园豆:3151 (老鸟四级) | 2008-06-18 17:24
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册