RT,求一个oracle存储过程
使用游标的,最好有输入输出,
使用游标的,最好有输入输出,
解决方案 »
- 求jsp和java数据的传送???
- 循环语句中的<input type="hidden" name="??">的取名问题?
- jsp servlet session问题,在线救教!!!
- 一个很基础的问题(菜鸟提问)
- 请求帮助~如何把"忘记密码"的密码返回的用户个人邮箱
- String对象的replaceAll怎么用?我照写以下的函数,在编译时没出错,但执行时"java.lang.NoSuchMethodError: java.lang.String: method repl
- JavaScript中的数组能否将变量传递到JSP中呢?如果能,又该如何传递呢?
- 急问:关于连接数据库bean的几个问题?~~~~~~~~~waiting............
- 谁知道javax.management包在哪里可以找到!
- weblogic服务启动故障,大家看是怎么回事?
- 关于AJAX的棘手问题~~ 多谢了~~~~~~~~~~~~~~~~~
- 求-搜索引擎相关的论文/搜索引擎实现原理
I 服了 you
type t_cursor is ref cursor;
v_str varchar(1000);
v_cur t_cursor;
r_cur 计量点表码表200701%rowtype;
begin
v_str := 'select * from 计量点表码表 '||p_date|| ' ';
open v_cur for v_str;
loop
Fetch v_cur into r_cur;
exit when v_cur%notfound;
dbms_output.put_line( 'the result is: '||r_cur.计量点编码|| ' '||r_cur.费率类型);
end loop;
close v_cur;
end sp_test;
select name from syscolumns
where id=object_id( 'test1 ') and colid> 1 order by colid open t_cursor fetch next from t_cursor into @name while @@fetch_status=0
begin
exec( 'select '+@name+ ' as t into test3 from test1 ')
set @s= 'insert into test2 select ' ' '+@name+ ' ' ' '
select @s=@s+ ', ' ' '+rtrim(t)+ ' ' ' ' from test3
exec(@s)
exec( 'drop table test3 ')
fetch next from t_cursor into @name
end
close t_cursor
deallocate t_cursor