aspose file tools
The moose likes JDBC and the fly likes File as a input parameter to Stored Procedure Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "File as a input parameter to Stored Procedure" Watch "File as a input parameter to Stored Procedure" New topic
Author

File as a input parameter to Stored Procedure

Rahul Bansode
Greenhorn

Joined: Nov 03, 2011
Posts: 18

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

Joined: Mar 01, 2009
Posts: 1103
    
    7

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.


ex-Oracle bloke
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: File as a input parameter to Stored Procedure
 
Similar Threads
xls or csv file as in parameter in stored procedure
File as a input parameter to Stored Procedure
Array as input to stored procedure.
Passing multiple values to a stored procedure
How to pass BLOB to a PL/SQL Stored Procedure