Buenas, tengo el siguiente SP declarado en mi BD
Código SQL
[-]
CREATE PROCEDURE SP_SEGUIMIENTO_LLAMADAS(
TELEFONO CHAR(11) CHARACTER SET ISO8859_1)
RETURNS(
FECHA_CONTACTO DATE,
HORA_CONTACTO TIME,
ID_AGENTE CHAR(20) CHARACTER SET ISO8859_1,
RESULTADO CHAR(300) CHARACTER SET ISO8859_1,
RESULTADO_ICCS CHAR(250) CHARACTER SET ISO8859_1)
AS
begin
for
SELECT fecha_contacto, hora_contacto, id_agente, resultado, resultado_iccs
from seguimiento_llamadas where telefono_contacto_bbdd = :telefono order by id asc
into fecha_contacto, hora_contacto, id_agente, resultado, resultado_iccs do
begin
end
suspend;
Pero cuando lo ejecuto solo me devuelve un registro. Pero si hago la consulta directamente en la BD sin SP me devuelve 3 registros que son los que hay en la BD.
¿Sabe alguien porque me pasa esto? No tengo ni idea.