0
votes

I am running this code in oracle apex interactive report page to show the students pictures, but it is keep throwing this error "ORA-06550: line 2, column 14: ORA-00907: missing right parenthesis", however I checked there is not any parenthesis missing.

SELECT "ID", "NAME", decode(NVL(dbms_lob.getlength("PHOTO"),0),0,NULL,
      '<img 'src ="'|| apex_util.get_blob_file_src('P7_PHOTO',ID) ||'" width ="100"/>') from "#OWNER#."STUDENTS_INFO"
2
There's a stray ' (before img). Remove that. - sticky bit
thanks @stickybit i just removed that now it is showing this error "ORA-06550: line 2, column 7: ORA-00936: missing expression" , the code looking lieke this SELECT "ID", "NAME", decode(NVL(dbms_lob.getlength("PHOTO"),0),0,NULL, <img src ="' || apex_util.get_blob_file_src('P7_PHOTO',ID) || '" width ="100"/>') image from "#OWNER#."STUDENTS_INFO" - Mellad Qarizada
Now you're missing a ' before <img and a " after #OWNER#... - sticky bit

2 Answers

1
votes

You have a wrong single quote just before src

SELECT "ID"
    , "NAME"
    , decode(NVL(dbms_lob.getlength("PHOTO"),0),0,NULL,
       '<img src ="'|| apex_util.get_blob_file_src('P7_PHOTO',ID) ||'" width ="100"/>') 
FROM "#OWNER#"."STUDENTS_INFO"

and missed a double quote for "#OWNER#"

0
votes
SELECT  "ID",
        "NAME",
        DECODE(NVL(dbms_lob.getlength("PHOTO"),0),
        0,
        NULL,
        '<img src ="'|| apex_util.get_blob_file_src('P7_PHOTO',ID) ||'" width ="100"/>') PHOTO
FROM    "#OWNER#"."STUDENTS_INFO"