13/03/2013, 11:46
|
| | Fecha de Ingreso: agosto-2010
Mensajes: 127
Antigüedad: 14 años, 2 meses Puntos: 1 | |
Respuesta: funcion in estoy utilizando oracle 10g
mi funcion completa es la siguiente:
la variable de consulta.valores contiene "and tipo in (1,2,3)";
PROCEDURE consulta(codigo IN VARCHAR, descripcion IN VARCHAR, valores IN VARCHAR,RESULT OUT CUR_RECORDSET)
IS
BEGIN
OPEN RESULT FOR
EXECUTE IMMEDIATE 'SELECT codigo,descripcion
FROM estados
WHERE 0=0 AND ESTADO = 1 '||consulta.valores ||'ORDER BY CODREQUERIMIENTO DESC';
EXCEPTION
WHEN OTHERS THEN
OPEN RESULT FOR
SELECT '' FROM DUAL;
END;
y los errores que me salen son los siguientes
Error(409,21): PLS-00103: Encountered the symbol "IMMEDIATE" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between using || multiset member SUBMULTISET_ The symbol "( was inserted before "IMMEDIATE" to continue.
Error(412,44): PLS-00103: Encountered the symbol ";" when expecting one of the following: ) , * & | = - + < / > at in is mod remainder not rem => .. <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ as between from using || member SUBMULTISET_ The symbol ")" was substituted for ";" to continue. |