baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
- From: baslinux AT lists.ibiblio.org
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
- Date: Sat, 12 Jul 2008 04:44:32 +0000 (UTC)
select was not mentioned in the .help output.
sqlite newdatabase.db
This creates a new database called newdatabase.db, assuming it doesn't already
exist.
Then at the sqlite> prompt, you type
.read filename.sql
Note this is .read not just read. The leading dot tells sqlite it's a
command for sqlite not just sql.
This will probably give you an error along the lines of
SQL error near line 9: no such table: postamt
This is because your script drops the table before recreating it, and the
table won't exist in your blank database.
Then if you type
select * from postamt;
This displays all fields (as columns of information, one record per line)
If I have fields A B C D....
select A, B from postamt displays just columns A and B(Space optional after the comma)
I can start with:
sqlite -header postamt
Displays column headers but they are not lined up with the columns.
I could pad the headers to have spaces at their ends.
Maybe sqlite3 fixes this.
A|B|
Entry |Entry
Entry |Entry
sqlite -column postamt
Displays in columns, one record per line
sqlite -row postamt
Displays one field per row (similar to what dbf filename.dbf displays).
Up arrow works even within sqlite to repeat a previous command (including commands made during a previous usage, after quitting and restarting). Nice.
Minor drawback:
Unlike my DOS database programs (where hitting right arrow moves you to the next column and it is all lined up neatly, with some entries offscreen), if I have more than 80 columns it wraps instead of letting me scroll to the right. I could get 160 columns by using a framebuffer kernel and vga 793 (or a matrox video card that you can use fbset with). Any other ideas?
For some unknown reason my large database just now imported properly into a db file. I must have done something wrong before. I did not see 'syntax error' scroll by this time, but it does complain about \ (or was it /?) not being an acceptable character (in \' inside words, as opposed to ' that delimits field entries). But they don't seem to show up in the output (what you see onscreen with sqlite).
All I need to learn now is to edit, append, insert, copy, and sort entries, which are also not in the help output but may be in sqlite.gz man page.
Sindi
-
[BL] DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/01/2008
-
Re: [BL] DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/03/2008
-
[BL] Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/04/2008
-
[BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/08/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/08/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225, baslinux, 07/09/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/09/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225, baslinux, 07/10/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,,
baslinux, 07/11/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/12/2008
- [BL] upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/12/2008
- [BL] Opera 9.51 was Re: upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/13/2008
- Re: [BL] Opera 9.51 was Re: upgrading glibc 2.2.5 to 2.3.1, baslinux, 07/15/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/13/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/08/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
- [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/14/2008
-
[BL] dbf to sql convertor, was Re: Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/08/2008
-
[BL] Spanish dollybase, was Re: DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/04/2008
-
Re: [BL] DBF database package xdb-1.2.0 for glibc225,
baslinux, 07/03/2008
Archive powered by MHonArc 2.6.24.