Re: [sqlite] Any way to do this faster?

2007-03-26 Thread Brian Johnson
Another way of saying what Dennis said (I had to read his reply twice before I understood it): your query: for every record in TableB it returns ALL the records in tableA and then looks through them Dennis's query: for every record in TableB it checks tableA directly for the existence of that ID

Re: [sqlite] Database design questions

2006-06-27 Thread Brian Johnson
Bud Beacham ([EMAIL PROTECTED]) wrote: > > If I offer an upgrade version with new tables how difficult will > it be for the user to merge their database into the latest > version? I will insure that any customer table names will not > conflict with my table names. > > Would it make more sense to

Re: [sqlite] How to realize the ROWID in a view?

2006-06-12 Thread Brian Johnson
It's been a while since I did it, but I think I just listed the fields to display and included that field name PY ([EMAIL PROTECTED]) wrote: > > Hi All, > > I have a problem about the ROWID in a view. I want to simulate a ROWID in a > view just like the same purpose in a table. > > For Example: >

Re: [sqlite] Re: apostrophe troubles

2006-04-13 Thread Brian Johnson
Thanks .. it's amazing how hard it is to google for this info Igor Tandetnik ([EMAIL PROTECTED]) wrote: > > Brian Johnson > <[EMAIL PROTECTED]> wrote: > > Here is example of what I'm trying to do in the bash script: > > > > sqlite3 db.dat "BEGIN; >

[sqlite] apostrophe troubles

2006-04-12 Thread Brian Johnson
I'm trying to script a multi-line command and the apostrophes are driving me nuts .. I can't get the right formatting Here is example of what I'm trying to do in the bash script: sqlite3 db.dat "BEGIN; \ UPDATE table1 SET name='O'Neil' WHERE person_id=2 \ COMMIT;" there are more UPDATE lines or

Re: [sqlite] ROWID

2006-04-12 Thread Brian Johnson
[EMAIL PROTECTED] wrote: > > "Brian Johnson" <[EMAIL PROTECTED]> wrote: > > Why does a INTEGER PRIMARY KEY field autoincrement when inserting a NULL > > into > > that field as per http://www.sqlite.org/faq.html#q1 and a field defined as > > int >

[sqlite] ROWID

2006-04-12 Thread Brian Johnson
I have a few questions about autoincrement and RowID that I couldn't google an answer I have a database for hardware with limited ram (and flash ram) so I'd like to use as little ram as possible. Is there any difference between the hidden field rowid and a field defined as INTEGER PRIMARY KEY?

Re: [sqlite] Re: Padding with zeros

2006-01-06 Thread Brian Johnson
I missed replying to the correct email, but this tip from Igor Tandetnik worked beautifully: Igor Tandetnik Thu, 29 Dec 2005 14:50:08 -0800 Brian Johnson wrote: I need to update a char field to add integer prefixes, but I need to pad them with zeroes so I can sort them. I'm not exactly sure

Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Brian Johnson
where can I find info about this? Jay Sprenkle ([EMAIL PROTECTED]) wrote: > > Have you looked at the collating sequence options? > perhaps you can get it to sort how you want without the padding. > > On 12/29/05, Igor Tandetnik <[EMAIL PROTECTED]> wrote: > > Brian

Re: [sqlite] Re: Padding with zeros

2005-12-29 Thread Brian Johnson
I have a field of text and I want to prefix the that text with numbers padded with zeroes. eg currently text 1 text 2 text 3 to become 001 text 1 002 text 3 003 text 2 or ultimately b001 text 1 b002 text 3 b003 text 2 Igor Tandetnik ([EMAIL PROTECTED]) wrote: > > Brian Johnson wrote:

[sqlite] Padding with zeros

2005-12-29 Thread Brian Johnson
I need to update a char field to add integer prefixes, but I need to pad them with zeroes so I can sort them. Can't google any info on how to do this. Could be a mixture of bash and sqlite sql since I want to occasionally run it from the command line