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: Mon, 14 Jul 2008 15:18:46 +0000 (UTC)
Sindi Keesan
On Mon, 14 Jul 2008, baslinux AT lists.ibiblio.org wrote:
select * from postamt;select was not mentioned in the .help output.
This is because it is standard SQL (Structured Query Language), rather than
a sqlite command.
I found it in the man page, which is starting to make more sense after your help.
if you use column mode (by starting with -column, or entering
.mode column
column headers line up
Thanks. I think displayed columns are 10 char by default and I would have to change that.
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?
Run in a batch file, and view the results in an editor.
e.g create a file select.sql:
.header on
.mode column
select * from postamt;
and then run
sqlite < select.sql > output.txt
and view output.txt with the editor of your choice.
I will experiment with the < > for outputting text.
There is also an .output which I could not figure out.
This would be nice for printing the database. I don't know how to edit it yet.
Both DOS programs let me display all the columns and edit them at the same time (and insert more records). Would I do the editing with a text editor? If so, HOW do I import the text file back into the database? I can't even figure out how to import CSV (created by 'dbf'), which ought to get rid of a lot of the stray garbage. The man page says:
sqlite database.db
.separator ',' (assuming the input file has commas not default |)I get an error message about table.
.import FILE TABLE
FILE is the CSV (text) file but what is TABLE? It is not the name of the database (with or without the .db). The sql file created by 'dbf' convertor set up a table and/or a database.
For some unknown reason my large database just now imported properly into
a db file.
The sql created by cdbf imports to 0 length, but the 'dbf' convertor output imports properly.
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.
You want to find an SQL tutorial. There are loads of them online.
e.g.
http://www.sql-tutorial.net/
http://www.dbbm.fiocruz.br/class/Lecture/d17/sql/jhoffman/sqltut.html
Thanks. I found one sqlite tutorial but it assumed prior knowledge.
SQL is a standard language for querying databases. It takes a bit more time to learn than the point and click type things you can do with access or other simple databases, but is way more powerful.
My DOS dbf database programs don't use a mouse but one is buggy and the other won't let you insert records and is slow. I have never used MS database programs.
Cheers
Ian
-
Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
, (continued)
- Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/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
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql convertor, was Re: Spanish dollybase,, baslinux, 07/15/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/16/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/16/2008
- Re: [BL] Importing csv to sqlite db, was Re: dbf to sql, baslinux, 07/17/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
Archive powered by MHonArc 2.6.24.