Hello all,
We have bunch of sql files ( .sql ) that we want to invoke from dbi (
Oracle ).
How does it work. Dbi expects actual sql statements to be given as it's
arguments whether in case of do() or prepare() methods. I wonder is
there any option
to just point the dbi to a sql file and dbi taking care of it. I do
understand that running
sql file is sqlplus feature and may not be applicable to dbi, as dbi is
more generic. We have
hundreds of sql files to be run like this. Each sql file has multiple
sql statements within it.
I know these are my options..
1) Parse sql files and assign each sql statement to string variable and
pass the string as an argument to do().
File handler routines may come in handy for this.
2) Do not use DBI. Instead call 'sqlplus' from perl itself with file as
input parameter.
Did anyone come across this. Is there any simple way to do this.
Thanks,
Ravi