Unsuccessful execution caused by system error that does not preclude
successful execution of subsequent statements.
data type not supported for arithmetic.
This Sql works :
select distinct a.abinp, a.ambname, b.fil, b.filname
from ope_doc_view a1
left join AB_DOC (:utente, :csoc, :nreserc) a on a.coddoc = a1.coddoc_1
left join FIL_DOC (:utente, :csoc, :nreserc) b on a.coddoc = b.coddoc
left join FITIPDOC c on (c.coddoc = a.tipdoc)
left join AB_DOC (:utente, :csoc, :nreserc) d on
(d.coddoc = a1.coddoc_2 and d.abinp = a.abinp)
left join FIL_DOC (:utente, :csoc, :nreserc) e on
(d.coddoc = e.coddoc and e.fil = b.fil)
left join FITIPDOC f on (f.coddoc = d.tipdoc)
where a1.codope = :ope and a1.coddoc_1 = :doc_1 and a1.coddoc_2 = :doc_2
and c.des60 is not null and f.des60 is not null
order by
a.abinp, b.fil
I get error with WHERE clause as I need :
where a1.codope = :ope and a1.coddoc_1 = :doc_1 and a1.coddoc_2 = :doc_2
and c.des60 is not null and f.des60 is not null and
a1.csoc = :csoc and a1.nreserc = :nreserc
or
where a1.codope = :ope and a1.coddoc_1 = :doc_1 and a1.coddoc_2 = :doc_2
and c.des60 is not null and f.des60 is not null and
a1.csoc = a.csoc and a.nreserc = :nreserc
-------------------------
I tried this way, adding test columns and changing procedure parameters
with same error:
select distinct a1.csoc, a1.nreserc, a.abinp, a.ambname, b.fil, b.filname
from ope_doc_view a1
left join AB_DOC (:utente, a1.csoc, a1.nreserc) a on a.coddoc = a1.coddoc_1
left join FIL_DOC (:utente, a1.csoc, a1.nreserc) b on a.coddoc = b.coddoc
left join FITIPDOC c on (c.coddoc = a.tipdoc)
left join AB_DOC (:utente, a1.csoc, a1.nreserc) d on
(d.coddoc = a1.coddoc_2 and d.abinp = a.abinp)
left join FIL_DOC (:utente, a1.csoc, a1.nreserc) e on
(d.coddoc = e.coddoc and e.fil = b.fil)
left join FITIPDOC f on (f.coddoc = d.tipdoc)
where a1.csoc = :csoc and a1.nreserc = :nreserc and
a1.codope = :ope and a1.coddoc_1 = :doc_1 and a1.coddoc_2 = :doc_2 and
c.des60 is not null and f.des60 is not null
order by
a.abinp, b.fil
Thanks for help
Adalberto Baldini
|
Adalberto Baldini wrote:
I have this view :
CREATE VIEW OPE_DOC_VIEW(
CSOC,
NRESERC,
...)
AS
select coalesce( b1.CSOC, b2.csoc),
coalesce (b1.NRESERC, b2.nreserc),
.....
removing coalesce with
AS
select b2.csoc,
b2.nreserc,
.....
it works but it should also work in original version. ??
|