Subject Invalid request BLR at offset 238 context already in use (BLR error)
Author Gugui
Hi all, someone could help me with this View ?

if I delete
WHEN 'V' then
case when exists(select 1 from FORMAPGTO f WHERE F.CKB1 = 'T'
and f.IDFORMAPGTO = a.idformapgto)
then '<YES>' ELSE '<NO>' END

the View is created

CREATE VIEW temp ( yesno )
AS
select
CASE (SELECT FIRST 1 P.TIPO FROM PEDIDO P WHERE P.IDPEDIDO = A.IDPEDIDO)
WHEN 'P' THEN
case when exists(select 1 from CLIENTE_FORMAPGTO cf
inner join pedido p on p.idcliente = cf.IDCLIENTE
where p.idpedido = a.idpedido and cf.IDFORMAPGTO = a.idformapgto)
then '<YES>' ELSE '<NO>' END
WHEN 'V' then
case when exists(select 1 from FORMAPGTO f WHERE F.CKB1 = 'T'
and f.IDFORMAPGTO = a.idformapgto)
then '<YES>' ELSE '<NO>' END
ELSE
NULL
END

FROM PRESTACAO_PEDIDO a;

thanks any help