Skip to Main Content

SQL & PL/SQL

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!

ORA-00932

Hi

Under Oracle 19c I made a simple select with cursors :

select
 'file1' as "filename",
 cursor(
   select
     a.NOM "nom",
     :P17_DATE_CALCULEE as "date_devis",
     a.PRENOM as "prenom",
     a.ADRESSE as "adresse",
     a.CODE_POSTAL as "code_postal",
     a.VILLE as "ville",
     a.TELEPHONE as "telephone",
     :P17_TOTAL as "total",
     a.ID as "numero_devis",
     cursor ( select
              b.motif as "motif",
              b.DESTINATION as "destination",
              b.DISTANCE as "distance",
              b.PRIX as "prix"
              from DY_DEVIS_LIGNE b
              where B.ID_DEVIS = :P17_NUMERO) 
   from DY_DEVIS a
   where a.ID = :P17_NUMERO
 ) as "data"
from dual

I get an error ORA-00932 inconsistent datatype :

ORA-00932: inconsistent datatypes: expected CHAR got CURSOR

What is wrong with the cursor ?

Best regards.

This post has been answered by Solomon Yakobson on Dec 29 2024
Jump to Answer
Comments
Post Details
Added on Dec 28 2024
12 comments
209 views