Question

Create new document with local file by PLSQL

  • 7 March 2023
  • 5 replies
  • 210 views

Userlevel 2
Badge +6
  • Do Gooder (Customer)
  • 19 replies

how to Create new document with local file by PLSQL? like create new document revision>click check in>select local file and open.


5 replies

Userlevel 7
Badge +30

It can be done if the "local" file is on the database server, using the utl_file package to read the file contents.

Can you tell us more about what it is that your want to achieve?

 

Userlevel 2
Badge +6

Mathias,

I want to create a new document revision with a local file check in by PLSQL. could you please share me sample of the code? thanks!

can the file in oracle database ‘Directories’ path? if no, I can try to move the file to database server folder.

Userlevel 6
Badge +12

@lion 

Hope below post will give you some insight.

 

Userlevel 2
Badge +6

Hi Sahan,

thanks for the info, I have saw the codes yesterday, the file is empty, I want the file is point to a local file and can checkin to the document revision.

Userlevel 7
Badge +30

You basically can combine the code in the post shared by Sahan with using utl_file. And yes, you need a DIRECTORY object in Oracle to do it.

I think you need to put together the complete code yourself, or try with ChatGPT 🙃 (it can actually produce PL/SQL code snippets).

Good luck!

 

Reply