On Sat, 24 Jul 2010 08:38:31 -0400, "ve3meo" <holden_fam...@sympatico.ca> wrote:
>"Roger Binns" <rog...@rogerbinns.com> wrote in >message news:4c4a5bd5.5010...@rogerbinns.com... >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> On 07/23/2010 07:47 PM, ve3meo wrote: >>> Is it possible to store the results of a PRAGMA statement, especially >>> PRAGMA >>> database_list in a SQLite temporary table using only SQLite commands? >> >> No. Is there any particular reason your code can't copy them internally? >> Remember that SQLite is a library - it lives inside your application - and >> is not some remote unchangeable component. > >I am a humble user of the command line implementation and of various SQLite >managers and not an application developer so I cannot do it in code. > >> Depending on what the information is you are obtaining, it may be possible >> to get it via direct queries on sqlite_master. > >Thanks, I'll investigate further. A humble example: k...@ozon ~/sql $ cat ve3meo.ksh #!/usr/bin/ksh # ## demo shell / sql mixture # SQLITE=$(which sqlite3) printf "SELECT sqlite_version() AS version;\n.schema\n" \ | ${SQLITE} $1 for t in $(printf ".tables\n" \ | ${SQLITE} $1) do printf "table %s:\n" $t printf ".headers on\nPRAGMA table_info(%s);\n" $t \ | ${SQLITE} $1 done k...@ozon ~/sql $ ./ve3meo.ksh unusedids.db3 3.6.23.1 CREATE TABLE integers ( id INTEGER PRIMARY KEY AUTOINCREMENT ); CREATE TABLE test ( id INTEGER PRIMARY KEY NOT NULL, tx TEXT ); table integers: cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|0||1 table test: cid|name|type|notnull|dflt_value|pk 0|id|INTEGER|1||1 1|tx|TEXT|0||0 k...@ozon ~/sql $ -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users