troubleshooting Question

Error(14,16): PL/SQL: ORA-00904: "IMAGES": invalid identifier

Avatar of chalie001
chalie001 asked on
DatabasesOracle Database* Oracle PL/SQL* Oracle12c* Oracle DBA
3 Comments1 Solution133 ViewsLast Modified:
Hi am geting this error after creating directory i did the following
SQL> connect sys /as sysdba
Enter password:
Connected.
SQL> CREATE DIRECTORY IMAGES AS '/u01/images';

Directory created.

SQL> commit;

Commit complete.

SQL> GRANT READ ON DIRECTORY IMAGES TO dba_users;

Grant succeeded.

SQL> commit;
images error
CREATE TABLE NOC_IMAGE_LIABRARY (id NUMBER,IMAGE_name VARCHAR2(50),image BLOB);

create or replace procedure load_images
(
   p_id         in   number,
   p_file_name      in   varchar2
)
is
   v_bfile          bfile := bfilename( 'IMAGES' , p_file_name);
   v_blob          blob;
   v_src_offset  number := 1;
   v_dst_offset  number := 1;
begin

     insert into NOC_IMAGE_LIABRARY (id, file_name, images)
        values (p_id, replace(p_file_name,'.png'), empty_blob())
        return images into v_blob;

   dbms_lob.fileopen(v_bfile, dbms_lob.file_readonly);
   dbms_lob.loadblobfromfile(v_blob, v_bfile, dbms_lob.getlength(v_bfile),v_src_offset,v_dst_offset);
   dbms_lob.close(v_bfile);
   commit;
end;
/
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros