more useful options | |
PerlMonks |
Re: DBI and SQLite's .read featureby Marshall (Canon) |
on Jan 26, 2017 at 09:46 UTC ( [id://1180371]=note: print w/replies, xml ) | Need Help?? |
You wrote:
So in SQLite you can do a .read to run all the SQL commands inside of a *.sql file. So in effect, you can drop and build temporary tables, populate them and finish with a SELECT at the end.From the SQLite command line tool: sqlite> .read create.sql In Perl, it is completely possible to issue this: '.read create.sql' command to the SQLite tool. I don't know where this 'create.sql' file comes from and I don't know where this "final SQL SELECT" statement comes from? I would run the .sql file (either manually or via Perl). Then use Perl to scan that .sql file for CREATE TABLE statements, extract the table names and then run via DBI SELECT * from TABLE x statements. What am I missing here?
In Section
Seekers of Perl Wisdom
|
|