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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error into a case statement

Hi,

Under Oracle 19.c I try to make a select that transform a column into an hypertext link. But I get an error message ;

I try to change the SQL request but i get an error :

select ID,
      NOM,
      "PRÉNOM",
      TITRE,
      CASE LIEN_CV
      WHEN NULL THEN NULL
      ELSE '<a href="' || LIEN_CV ||'">CV</a>' as "LIEN"
      END
 from EC_CV 

ORA-20999: Echec de l'analyse de la requête SQL. ORA-06550 : ligne 7, colonne 44: ORA-00905: mot-clé absent

If i change to asimpler select there is no error;

select ID,
      NOM,
      "PRÉNOM",
      TITRE,
      CASE LIEN_CV
      WHEN NULL THEN NULL
      ELSE 'test'
      END
 from EC_CV 

The DDL of the table :

CREATE TABLE "EC_CV" 
  (    "ID" NUMBER GENERATED BY DEFAULT ON NULL AS IDENTITY MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE  NOKEEP  NOSCALE  NOT NULL ENABLE, 
    "NOM" VARCHAR2(50), 
    "PRÉNOM" VARCHAR2(50), 
    "TITRE" VARCHAR2(255), 
    "RGPD" VARCHAR2(50), 
    "LIEN_CV" VARCHAR2(255), 
    "LIEN_PROFIL" VARCHAR2(255), 
     PRIMARY KEY ("ID")
 USING INDEX  ENABLE
  ) ;

Best regards.

Comments
Post Details
Added on Oct 29 2024
4 comments
140 views