oracle v_id(),在线急等!oracle存储过程如何一直提示Parameter 'v_UserID' is declared but never used in 'forums_Privat...

该博客讨论了一个Oracle存储过程中遇到的问题,即参数'v_UserID'被声明但未在'forums_PrivateMessages_Get'过程中使用。代码中展示了创建存储过程的详细步骤,包括条件判断和临时表的使用,但因为'v_UserID'未在任何查询中使用,导致编译警告。作者寻求解决方案以消除这个警告。
摘要由CSDN通过智能技术生成

当前位置:我的异常网» Oracle管理 » 在线急等!oracle存储过程如何一直提示Parameter 'v

在线急等!oracle存储过程如何一直提示Parameter 'v_UserID' is declared but never used in 'forums_PrivateMessages_Get'?

www.myexceptions.net  网友分享于:2013-03-27  浏览:103次

在线急等!!!!oracle存储过程怎么一直提示Parameter 'v_UserID' is declared but never used in 'forums_PrivateMessages_Get'???

源代码如下:

create   or   replace   procedure   forums_PrivateMessages_Get

(     v_UserID   in   integer,

v_PrivateMessageType   in   integer,   --   1   已经发送,   2   收到的私人消息

v_unreadOnly   in   number,

v_unreplyOnly   in   number,

v_PageSize   in   integer,

v_PageIndex   in   integer)

is

v_PageLowerBound   integer;

v_PageUpperBound   integer;

v_string1   varchar2(500);

v_MessageID   integer;

begin

--DECLARE   v_RowsToReturn   int

--   First   set   the   rowcount

--SET   v_RowsToReturn   =   v_PageSize   *   (v_PageIndex   +   1)

--SET   ROWCOUNT   v_RowsToReturn

--   Set   the   page   bounds

v_PageLowerBound   :=   v_PageSize   *   v_PageIndex;

v_PageUpperBound   :=   v_PageLowerBound   +   v_PageSize   +   1;

--   Create   a   temp   table   to   store   the   select   results

execute   immediate   'CREATE   GLOBAL   TEMPORARY   TABLE   PageIndex

(

IndexID   int   IDENTITY   (1,   1)   NOT   NULL,

MessageID   int

)ON   COMMIT   delete   ROWS ';

IF   v_PrivateMessageType=1   then

IF   v_unreadOnly=1   AND   v_unreplyOnly=1   then

v_string1   := 'INSERT   INTO   PageIndex   (MessageID)

select   MessageID   from   forums_PrivateMessages   where   SenderUserID=v_UserID   AND   IsSenderDelete=0   AND   IsRead=0   AND   IsReply=0   ORDER   BY   CreateTime   DESC '   ;--IsRead   --IsReply

ELSIF   v_unreadOnly=1   then

v_string1   := 'INSERT   INTO   PageIndex   (MessageID)

select   MessageID   into   v_MessageID     from   forums_PrivateMessages   where   SenderUserID=v_UserID   AND   IsSenderDelete=0   AND   IsRead=0   ORDER   BY   CreateTime   DESC ';

ELSIF   v_unreplyOnly=1   then

v_string1   := 'INSERT   INTO   PageIndex   (MessageID)

select   MessageID   into   v_MessageID     from   forums_PrivateMessages   where   SenderUserID=v_UserID   AND   IsSenderDelete=0   AND   IsReply=0   ORDER   BY   CreateTime   DESC ';

ELSE

v_string1   := 'INSERT   INTO   PageIndex   (MessageID)

select   MessageID   into   v_MessageID     from   forums_PrivateMessages   where   SenderUserID=v_UserID   AND   IsSenderDelete=0   ORDER   BY   CreateTime   DESC ';

文章评论

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值