🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #441

Sql Error

#441
From: Adalberto Baldini
Date: Tue, 18 Mar 2008 09:37
54 lines
3099 bytes
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
Technical Details
Message-ID: <47df8d5f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,4d2d69b99c57604e,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 18 Mar 2008 10:37:35 +0100
From: Adalberto Baldini <finman@swissonline.ch>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.interbase.sql
Subject: Sql Error
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 80.183.140.110
Message-ID: <47df8d5f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1205833055 80.183.140.110 (18 Mar 2008 02:37:35 -0700)
Lines: 55
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!feeder.news-service.com!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail