Re: [sqlite] 2 Questions from a newbie

2008-08-19 Thread Jeff Hamilton
If all 2,400 tables have the same 9 columns you could try using a single table and adding a column for the ticker of the stock and then add an index to that column to allow quick lookups based on the ticker. -Jeff On Tue, Aug 19, 2008 at 9:44 AM, .:UgumugU:. [EMAIL PROTECTED] wrote: Hi

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-06-03 Thread Jeff Hamilton
On Tue, May 20, 2008 at 2:56 PM, D. Richard Hipp [EMAIL PROTECTED] wrote: OK. How about: INSERT INTO foo(bar) VALUES(coalesce(?,'default-value')); This approach is working well for us, but as Dennis pointed out it won't work for all situations. I wonder if it's worth adding something like

[sqlite] Bind arguments for insert and not null columns with default values

2008-05-20 Thread Jeff Hamilton
Hi all, I have a table like this CREATE TABLE foo (bar TEXT NOT NULL DEFAULT 'default_value'); and I'd like to create a reusable statement to do inserts into foo, like this: INSERT INTO foo (bar) VALUES (?); Sometimes I have values for bar and sometimes I don't and want the default. Is there

Re: [sqlite] Bind arguments for insert and not null columns with default values

2008-05-20 Thread Jeff Hamilton
multiple columns with default values, so the number of required statements for all cases can get fairly large. -Jeff On Tue, May 20, 2008 at 11:40 AM, D. Richard Hipp [EMAIL PROTECTED] wrote: On May 20, 2008, at 2:33 PM, Jeff Hamilton wrote: Hi all, I have a table like this CREATE TABLE

Re: [sqlite] One sqlite*, multiple threads

2008-05-16 Thread Jeff Hamilton
If you're using the same database connection they will not progress simultaneously, you need one connection per thread for that to work. -Jeff On Fri, May 16, 2008 at 8:00 AM, Jeffrey Rennie [EMAIL PROTECTED] wrote: I looked in the documentation, and scanned the source code, but haven't yet

Re: [sqlite] step back (again)

2008-03-16 Thread Jeff Hamilton
Lee [EMAIL PROTECTED] wrote: On 2008 March 15 (Sat) 05:21:53pm PDT, Jeff Hamilton [EMAIL PROTECTED] wrote: What about something like this: SELECT title FROM tracks WHERE singer='Madonna' AND (title:firsttitle OR (title=:firsttitle AND rowid:firstrowid

Re: [sqlite] step back (again)

2008-03-15 Thread Jeff Hamilton
What about something like this: SELECT title FROM tracks WHERE singer='Madonna' AND (title:firsttitle OR (title=:firsttitle AND rowid:firstrowid)) ORDER BY title DESC, rowid ASC LIMIT 5; Then you only have to remember the single title and rowid of the first item in the

Re: [sqlite] step back (again)

2008-03-15 Thread Jeff Hamilton
PROTECTED] wrote: Jeff Hamilton wrote: What about something like this: SELECT title FROM tracks WHERE singer='Madonna' AND (title:firsttitle OR (title=:firsttitle AND rowid:firstrowid)) ORDER BY title DESC, rowid ASC LIMIT 5; Then you only have

[sqlite] Cross DB triggers?

2008-03-03 Thread Jeff Hamilton
Hi all, I have a setup with two databases that have tables which refer to each other. I'd like to create triggers to handle cleanup when items are deleted from one database that are referred to from the second database. My attempts at doing this have all failed, either with SQL parse errors or

Re: [sqlite] Problems with Floating Point

2008-02-26 Thread Jeff Hamilton
The problem is that on ARM there are two ways to represent 64bit floating point numbers when using software floating point emulation, FPA and VFE. FPA uses little endian byte order but big endian word order and is the default for most GCC configurations (why, I have no idea...). VFE is fully

Re: [sqlite] Is there always an index on ROWID?

2008-02-20 Thread Jeff Hamilton
The table data is stored in a b-tree keyed off of the rowid, so lookups based on rowid should always be fast. -Jeff On Wed, Feb 20, 2008 at 6:27 PM, Neville Franks [EMAIL PROTECTED] wrote: Hi, If I create a table with a Primary key on a TEXT clm, will there still be an Index on the in-built

Re: [sqlite] Should the next release be 3.5.4 or 3.6.0?

2007-12-13 Thread Jeff Hamilton
My vote is for 3.5.4. -Jeff - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Jeff Hamilton
There is a new look up on the demo site at http://sqlite.hwaci.com/ It looks good on Firefox and Safari, but IE6 renders it incorrectly. Being entirely in the unix world now, I am of a mind to ignore the IE6 problem and just let lingering IE6 users see a goofed up display. I wonder

[sqlite] Variable substitution for table names

2007-05-09 Thread Jeff Hamilton
Hi all, I have a complex query that I want to run often and store the results to a temporary table. I'd like to compile a statement that looks something like: CREATE TEMP TABLE ? AS SELECT * FROM data WHERE value = ?; so that I can have multiple threads accessing the results of the query in