这个语名提示NUM1无效,求解答,这是从SQLSERVER改过来的!谢谢,兄弟没有分了declare
n number;
pageNum number;
pageIndex number;
count1 number;
num1 number;
begin
pageNum:=10;
pageIndex:=1;
num1:= pageIndex*pageNum;
select count(*) into count1 from NBMM_USER_MSG where mType=''+1+'';
if(count1<num1)
then
n:=count1-((pageIndex-1)*pageNum);
else
n:=pageNum;
end if;
Execute Immediate 'select mid,mtype,m_mid,m_floor,muser,mmail,muserip,msg,muserimg,mdate,count1 as allcount from (select * from (select * from NBMM_USER_MSG where mType=''+1+'' and rownum<=num1 order by mDate desc) A where rownum<=n order by mDate asc ) B order by mDate desc';
end;
n number;
pageNum number;
pageIndex number;
count1 number;
num1 number;
begin
pageNum:=10;
pageIndex:=1;
num1:= pageIndex*pageNum;
select count(*) into count1 from NBMM_USER_MSG where mType=''+1+'';
if(count1<num1)
then
n:=count1-((pageIndex-1)*pageNum);
else
n:=pageNum;
end if;
Execute Immediate 'select mid,mtype,m_mid,m_floor,muser,mmail,muserip,msg,muserimg,mdate,count1 as allcount from (select * from (select * from NBMM_USER_MSG where mType=''+1+'' and rownum<=num1 order by mDate desc) A where rownum<=n order by mDate asc ) B order by mDate desc';
end;
解决方案 »
- Oracle 11g R2安装时自建数据库的语言设置(https://localhost:1158/em)
- 请问怎么样在Oracle的9i版本中使用wm_concat这个函数,自定义此函数为什么不行??
- getConcurrency() 问题!!急,在线等。。。。。。
- 如何查看对一个表做了哪些Update,Delete操作
- connect by prior fid=id start with
- 【再次求助】怎么插入“&”符号?????
- exp定期导出数据时生成的dmp文件要求编号是导出的日期,比如今天040924.dmp
- 求ORACLE和SQL SERVER的SQL语句中的一些区别
- 请教高手:ROWID的问题!分不多了,但言而有信,最迟明天结帖,请大家帮帮忙!
- 一个字段中多个值的匹配问题
- 数据库存储的数据去除空行
- Oracle编程时遇到的字符连接串疑惑
using num1,n;
在oracle中用||而不是+
如'a'||'b' ——> 'ab'
这句有问题,num1、n是变量,不能放在字符串里面,应该用连接符||连接