Problema con un procedimiento
Publicado por morfeo (1 intervención) el 23/03/2006 19:48:38
Hola a todos.
tngo problemas con este procedimiento.
create or replace procedure calc is
tab_name varchar2;
col_id number;
col_size_v number;
tam number;
row_size number;
cursor tab_names is select table_name from user_tables;
begin
open tab_names
loop
fetch tab_names into tab_name;
EXIT WHEN tab_names%NOTFOUND;
row_size=0;
for column_id2 in select column_id from cols where table_name=:tab_name
loop
select decode(data_type,'NUMBER',trunc((data_precision+1)/2)+1,data_length) as size_col
from user_tab_columns
where column_id=:column_id2 and table_name=:tab_name
IF size_col >= 250 THEN
tam := size_col + 3;
ELSE
tam := size_col + 1;
end IF;
row_size= row_size + tam;
end loop;
IF DEBUG THEN
dbms_output.put(' Tabla: '|| tab_name ||' Tamaño: '|| row_size ||' bytes ')
dbms_output.new_line;
END IF;
END LOOP;
CLOSE tab_names;
end;
cuando trato de crearlo, me marca este error
Warning: PROCEDURE created with compilation errors.
estoy utilizando Toad 8.0...... y oracle 9i . no se que esta mal ni como hacer para saber en que linea fue el error.
por favor alguien puede ayudarme tks.
tngo problemas con este procedimiento.
create or replace procedure calc is
tab_name varchar2;
col_id number;
col_size_v number;
tam number;
row_size number;
cursor tab_names is select table_name from user_tables;
begin
open tab_names
loop
fetch tab_names into tab_name;
EXIT WHEN tab_names%NOTFOUND;
row_size=0;
for column_id2 in select column_id from cols where table_name=:tab_name
loop
select decode(data_type,'NUMBER',trunc((data_precision+1)/2)+1,data_length) as size_col
from user_tab_columns
where column_id=:column_id2 and table_name=:tab_name
IF size_col >= 250 THEN
tam := size_col + 3;
ELSE
tam := size_col + 1;
end IF;
row_size= row_size + tam;
end loop;
IF DEBUG THEN
dbms_output.put(' Tabla: '|| tab_name ||' Tamaño: '|| row_size ||' bytes ')
dbms_output.new_line;
END IF;
END LOOP;
CLOSE tab_names;
end;
cuando trato de crearlo, me marca este error
Warning: PROCEDURE created with compilation errors.
estoy utilizando Toad 8.0...... y oracle 9i . no se que esta mal ni como hacer para saber en que linea fue el error.
por favor alguien puede ayudarme tks.
Valora esta pregunta


0