Skip to main content
Question

Create new document with local file by PLSQL


Forum|alt.badge.img+7
  • Sidekick (Customer)
  • 29 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

Mathias Dahl
Superhero (Employee)
Forum|alt.badge.img+32
  • Superhero (Employee)
  • 2895 replies
  • March 7, 2023

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?

 


Forum|alt.badge.img+7
  • Author
  • Sidekick (Customer)
  • 29 replies
  • March 8, 2023

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.


Forum|alt.badge.img+14
  • Superhero (Employee)
  • 177 replies
  • March 8, 2023

@lion 

Hope below post will give you some insight.

 


Forum|alt.badge.img+7
  • Author
  • Sidekick (Customer)
  • 29 replies
  • March 8, 2023

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.


Mathias Dahl
Superhero (Employee)
Forum|alt.badge.img+32
  • Superhero (Employee)
  • 2895 replies
  • March 8, 2023

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!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings