Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: DBI and SQLite's .read feature (updated)

by aplonis (Pilgrim)
on Jan 26, 2017 at 14:33 UTC ( #1180385=note: print w/replies, xml ) Need Help??


in reply to Re: DBI and SQLite's .read feature (updated)
in thread DBI and SQLite's .read feature

Yes, excellent! This worked quite well indeed.

system('sqlite3', $DB_FILE, '.read filename.sql')==0 or die "sqlite3 failed, \$?=$?";

The reason I wanted to do it this way is that the *.sql in question updates one table by summarizing plural columns from a plurality of other tables, building a number of temporary tables in the process. There are four such *.sql files for similar summaries, each one a whole page of SQL code, which itself never changes, and which I wished to keep from complicating my Perl.

The final query, to be issued from Perl, pulls already-summarized rows from the now easily updatable table. Thank you so much!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1180385]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2019-07-19 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?