Subject Can't retrieve plan!
Author Valdir Stiebe Junior
Hi,
I'm getting this exception while trying to execute this sql statement. Note
that GET_ANIMAIS_ATIVOS and GET_CATEGORIA_NA_DATA are two stored procs.
I was looking at google groups and only found that the older ibx versions
raise this expection when the plan is bigger than 1k. But i'm using IBX5.04.
And executing with IBConsole 1.1.0.14 (the lastest) i've got the same error.
Is this anything i can do instead of 'eating' the exception?

select
CA.ID_CATEGORIA_ANIMAL ID_GRUPO,
CA.NOME NOME_GRUPO,
A.BRINCO,
A.ID_ANIMAL,
A.NOME,
A.ID_ESPECIE,
A.REGISTRO,
A.DATA_NASC,
(current_date - A.DATA_NASC) IDADE_DIAS,
RC.NOME RACA,
GS.NOME GRAU_SANGUE,
RA.RESULTADO,
RA.DATA_RESULTADO DATA,
(((RA.DATA_RESULTADO - A.DATA_NASC)/365.0)*12) IDADE_NO_PARTO
from
GET_ANIMAIS_ATIVOS('2002-02-22', NULL, NULL) GAA inner join
ANIMAL A on (A.ID_ANIMAL = GAA.ID_ANIMAL) inner join
REPRODUCAO_ANIMAL RA on (A.ID_ANIMAL = RA.ID_ANIMAL) left outer join
RACA RC on (RC.ID_RACA = A.ID_RACA) left outer join
GRAU_SANGUE GS on (GS.ID_GRAU_SANGUE = A.ID_GRAU_SANGUE) inner join
GET_CATEGORIA_NA_DATA(A.ID_ANIMAL, '2002-02-22') GCD on (1=1) left outer
join
CATEGORIA_ANIMAL CA on (CA.ID_CATEGORIA_ANIMAL = GCD.ID_CATEGORIA_ANIMAL)
where
RA.TIPO_PARTO in (1,2) and
A.ATIVO = 1 and
(A.ID_ESPECIE = 1) and
(RA.DATA_RESULTADO between '2002-02-01' and '2003-02-28')
order by
CA.NOME, CA.ID_CATEGORIA_ANIMAL, A.BRINCO, A.ID_ANIMAL, RA.DATA_RESULTADO