Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQL Query error: ORA-01722: invalid number

Frankieboy2kNov 15 2017 — edited Nov 15 2017

Hello people,

If I run my query I get the ORA-01722: invalid number error.

Here under this sentence you have my query:

select dk.dossier,bh.depot depot,dk.jnltype adrtype,dk.adrcode

          ,bh.pro_id bon_wrfinx,bh.adres  || case srg.f_invoice.f_address_is_pobox(dk.dossier, bh.adres)

when 1 then chr(10)  || chr(10)  || chr(10) ||  chr(10) || srg.f_invoice.f_business_address(dk.dossier, bh.adrtype, dk.adrcode)

else null

end

as adres

          ,to_char(bh.header) bon_header,dk.document_key

          ,(select max(procode) from p_project where pro_id=bh.pro_id) wrfkode

          ,dk.jnltype||dk.journaal journaal,dk.document,dk.boekjaar,dk.periode,dk.datum,dk.munt_doc

          ,bl.volgnummer,bl.productcode,bl.omschrijving,bl.hoeveelheid

         ,decode(bl.eenheid,null,'-','N/A','-','n/a','-','TP','-','tp','-','--','-','EUR',' ',bl.eenheid) eenheid

         ,decode(bl.eenheid,'EUR',bl.hoeveelheid,bl.prijs) ehkost

         ,round(hoeveelheid*prijs,2) zak_bedrag

          ,bl.kortingperc btw_perc,bl.kortingbedrag btw_zakc,bl.commentaar

          ,bh.bon_id,nvl(bh.leverdatum,dk.datum) leverdatum,lower (to_char (nvl(bh.leverdatum,dk.datum), 'FMDD Month RRRR','nls_date_language=english')) leverdatum_char,to_char(nvl(bh.leverdatum,dk.datum),'dd/mm/yyyy') leverdatum_head,bh.verzonden

          ,(select max(to_char(bondatum,'dd/mm/rr') ||' to '||to_char(leverdatum,'dd/mm/rr'))

              from p_bon where bon_id=nvl(bh.bon_id_ref,-9)) fac_periode

          ,bh.initiaal_2 initiaal,btw_nummer btwnr_klant

          ,lower(vw.omschrijving) klant_betvw

  from x_betaalvoorwaarde vw,f_adres ad,p_bonlijn bl,p_bon bh,f_document dk

             where dk.dossier='KRI' and dk.jnltype='K' and dk.boekjaar=2017

   and dk.document between 'K29-2017100001' and 'K29-2017100002'

   and bh.document_key=dk.document_key and nvl(bl.pro_id,-1)!=0 and bh.dossier='KRI'

   and bl.bon_id=bh.bon_id

   and ad.dossier=dk.dossier and ad.adrtype=dk.jnltype and ad.adrcode=dk.adrcode

   and (nvl(:AFD_STATUS,'0')='0' or (bh.verzonden=1 and nvl(ad.mailoptie,9) = 9))

   and vw.dossier(+)=dk.dossier and vw.betaalvoorwaarde(+)=dk.betaalvoorwaarde

order by document,volgnummer

I have to put a value here as you can see but I don't know what value exactly...

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2017
Added on Nov 15 2017
2 comments
1,029 views