aplonis has asked for the wisdom of the Perl Monks concerning the following question:
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.
So... After a .read foo.sql via the CLI in from SQLite, I get back rows which are the result of only just that final SELECT.
It would vastly simplify my Perl if I could issue such a .read foo.sql via DBI and so receive back only just that final SELECT just as fetchrowarray() would get it. This rather than having to separately via DBI do all the table building and populating.
This being my wish, is there any way, via DBI, to accomplish the equivalent of a fetchrowarray() but with .read foo.sql as the SQL command?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: DBI and SQLite's .read feature
by NetWallah (Canon) on Jan 26, 2017 at 05:48 UTC | |
Re: DBI and SQLite's .read feature
by Corion (Patriarch) on Jan 26, 2017 at 07:50 UTC | |
Re: DBI and SQLite's .read feature (updated)
by haukex (Archbishop) on Jan 26, 2017 at 08:53 UTC | |
by aplonis (Pilgrim) on Jan 26, 2017 at 14:33 UTC | |
Re: DBI and SQLite's .read feature
by Marshall (Canon) on Jan 26, 2017 at 10:19 UTC | |
Re: DBI and SQLite's .read feature
by Marshall (Canon) on Jan 26, 2017 at 09:46 UTC | |
by Corion (Patriarch) on Jan 26, 2017 at 09:48 UTC | |
by Marshall (Canon) on Jan 26, 2017 at 12:22 UTC |