I want to create a block from a pl/sql procedure, so this is my first time with this function I tried with a simple sql-statement (using Data Block Wizard) but when I do 'execute_query' developer return the following error message:
FRM-40505:ORACLE error: unable to perform the query.
I have problems too to select the 'Available Columns' in the Datablock Wizard, I have all columns repeated...why???
my PROGRAM UNITS :
-- Package (spec)
PACKAGE model IS
TYPE model_rec IS RECORD(
cod my_table.cod_field%TYPE,
description my_table.desc_field%TYPE);
TYPE model_cursor IS REF CURSOR RETURN model_rec;
PROCEDURE query_select(
result IN OUT model_cursor);
END;
------------------------------------------------------
-- Package (body)
PACKAGE BODY model IS
PROCEDURE query_select(
result IN OUT model_cursor) IS
BEGIN
OPEN result
FOR
SELECT t.cod_field,
t.desc_field
FROM my_table b;
END;
END;
FRM-40505:ORACLE error: unable to perform the query.
I have problems too to select the 'Available Columns' in the Datablock Wizard, I have all columns repeated...why???
my PROGRAM UNITS :
-- Package (spec)
PACKAGE model IS
TYPE model_rec IS RECORD(
cod my_table.cod_field%TYPE,
description my_table.desc_field%TYPE);
TYPE model_cursor IS REF CURSOR RETURN model_rec;
PROCEDURE query_select(
result IN OUT model_cursor);
END;
------------------------------------------------------
-- Package (body)
PACKAGE BODY model IS
PROCEDURE query_select(
result IN OUT model_cursor) IS
BEGIN
OPEN result
FOR
SELECT t.cod_field,
t.desc_field
FROM my_table b;
END;
END;