小弟刚刚接触ORACLE存储过程,有一个问题向各位同行求教,小弟写了一个存储过程,其目的是接收一个参数作为表名,然后查询该表中的全部记录的某一个字段的内容导入到另一个表中。
(
tabname in varchar
)
is
v_servicesname tabname.服务类型%type; --这个变量就是用来存放所要取得的字段内容,但不知该如何定义
cursor curSort1 is select 服务类型 from tabname order by 编码; --此语句也不对提示找不到表名begin
.....
end getservicesname1;
(
tabname in varchar
)
is
v_servicesname tabname.服务类型%type; --这个变量就是用来存放所要取得的字段内容,但不知该如何定义
cursor curSort1 is select 服务类型 from tabname order by 编码; --此语句也不对提示找不到表名begin
.....
end getservicesname1;
解决方案 »
- 帮我看看这个存储过程哪错了?
- 高手请教:表占空间无故疯狂增大!!!
- 关于OCI函数释放句柄空间的问题
- ORACLE8.16能否安装在WINXP PRO 版本2002,如果能为什么点Setup没有任响应?
- 紧急求助:64位xp系统安装oracle8.17时出现错误ora-12546:TNS许可被拒绝
- Oracle数据库启动时报错:ORA-01078:处理系统参数失败。不知哪一位高人能解决一下,谢谢!
- 为什么grant create view to 'BIZDATA1';在下面的procedure中编译不过去?
- 这句Oracle的存储过程如何用 MS-SQL Server的SQL脚本描述啊?
- oracle中是否存在类似于SQL SERVER中sp_who的系统存储过程
- 有关Tablespace问题
- 求助:如何在存储过程中拆分字符串?
- DBMS_JOB菜鸟问题,,去ITPUB没人回,,来CSDN了。。
id pls_integer;
total pls_integer := 0;
type emp_cur is ref cursor;
cur emp_cur;
begin
open cur for 'select employee_id from ' || tb;
loop
fetch cur into id;
exit when cur%notfound;
total := total + id;
end loop;
close cur; dbms_output.put_line(total)
end;