I got the answer from Mike's tutorial!   Thought I don't necessarily understand 
what I
was doing wrong in the command line interface, I can type commands like:

sqlite prog.db ".table" 

and:

sqlite prog.db ".schema" 

from my UNIX prompt.

So I'm definitely back on track.   thanks.  -daniel


--- daniel civello <[EMAIL PROTECTED]> wrote:

> thanks for the help guys, but it still doesn't seem to work.  
> 
> I've tried the .schema and .tables commands, as well as:
> 
> SELECT * FROM SQLITE_MASTER WHERE type='table';
> 
> The 'sqlite' prompt just comes immediately back with no information.
> 
> SQLite version 2.8.15
> Enter ".help" for instructions
> sqlite> attach database 'prog.db' as AHA;
> sqlite> .databases
> seq  name             file                                                    
>   
> ---  ---------------  ---------------------
> 0    main                                                                     
>   
> 1    temp                                                                     
>   
> 2    AHA              /ravine/users/civello/AHA/prog.db                       
>   
> sqlite> SELECT * FROM SQLITE_MASTER WHERE type='table';
> sqlite> .tables 'AHA';
> sqlite> .schema 'AHA';
> sqlite> .schema prog.db;
> sqlite> .schema '/ravine/users/civello/AHA/prog.db';
> 
> No luck.  But here's a query with this that works:
> 
> sqlite> select distinct aol_keywords.keyword from aol_keywords where keyword 
> like
> 'Pulmonary%';
> Pulmonary artery
> Pulmonary circulation
> Pulmonary edema
> Pulmonary embolism
> Pulmonary function
> Pulmonary heart disease
> Pulmonary valve
> sqlite> 
> 
> Okay, so AOL_KEYWORDS is a table in this 'prog.db' file...  but:
> 
> sqlite> .tables AOL_KEYWORDS;
> sqlite> .tables 'AOL_KEYWORDS';
> 
> isn't giving me any information.
> 
> ideas?  Thanks again.
> 
> incidentally, there's a string in this 'prog.db' file that says:
> 
> ~/AHA> strings prog.db | head -1 
> ** This file contains an SQLite 2.1 database **
> ~/AHA> 
> 
> but using sqlite3, I can't attach the database.  It says:
> 
> SQLite version 3.0.8
> Enter ".help" for instructions
> sqlite> attach database 'prog.db' as AHA;
> SQL error: file is encrypted or is not a database

Reply via email to