Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

SQLite command line

by Anonymous Monk
on Jan 27, 2012 at 14:27 UTC ( #950378=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
is it possible to access the command line interface of SQLite from the shell if I have sqlite in the perl distribution only and not as a stand-alone application?

Comment on SQLite command line
Re: SQLite command line
by Corion (Pope) on Jan 27, 2012 at 14:48 UTC
    No. See http://sqlite.org for what SQLite is and why what you want does not work. On the upside, it is not hard to read SQL line by line in Perl and feed that to DBD::SQLite. See DBIx::RunSQL.
Re: SQLite command line
by Marshall (Prior) on Jan 28, 2012 at 23:11 UTC
    I use SQLite Manager which is a Firefox plugin. I just installed the Perl DBD::SQLite module and this thing in the browser. I've never tried to run command line SQLite mainly because I just haven't needed to do so.
Re: SQLite command line
by repellent (Priest) on Jan 29, 2012 at 01:39 UTC
      Scratch_DB seems to be exact what I need ... but unfortunately does not work on ActivePerl because of String::Escape.
      DBI::Shell is too complex for a newbie.
      Thank you!

        but unfortunately does not work on ActivePerl because of String::Escape

        Sure it does, just fix the makefile, delete  MY::postamble

Re: SQLite command line
by ikegami (Pope) on Jan 29, 2012 at 09:21 UTC
    huh? What do you mean by "command line interface", and how does that differ from "stand-alone application"?
      Sorry if I express myself wrong. What I need is the follows. I have several files with 30+ columns which I need to import into the database. Of course I could write a create instruction and then insert into (..these 30 fields again ..) values. Using the command line I could just load file into a table.
      Scratch_DB seems to be the very thing I need for this but it seems not to run on ActivePerl.

        is it possible to access the command line interface of SQLite

        SQLite is an application programming interface (API).

        sqlite3 is a command line interface to a SQLite database.

        Did you mean "is it possible to access a command line interface to SQLite?"

        Did you mean "is it possible to access sqlite3?"

        Either way, the answer is surely the same: Yes, sqlite3 is available for Windows.

        Using the command line I could just load file into a table.

        That should read "Using sqlite3, I could just load file into a table.". Excellent. Exactly what you need.

        Update: Rewritten.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2014-09-20 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls