Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File as a input parameter to Stored Procedure

 
Rahul Bansode
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Friends,

Can I pass a CSV file as a input parameter to stored procedure ??
and will the stored procedure parse the CSV file ?

Is it feasible in Java ?

Is there any third party jar or any java class available to do this ?

Please suggest something .. .!

Thanks in advance.


 
chris webster
Bartender
Posts: 2407
33
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could pass the file in as chunks of a CLOB, although it's clunky. You could then use PL/SQL (if you're on Oracle) to do the CSV processing. But to be honest it's probably much easier with Java. See Martin Vajsar's last post here.

Alternatively, if you're on Oracle you can define an external table (which is like a table view of your file) then read the data directly from the file via the external table using SQL. This is great if you're doing a lot of serverside programming anyway, but is Oracle-specific.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic