[sqlite] What is the best way to select "evenly" ?

2017-01-02 Thread Ron Aaron
and I'm scratching my head as to how to accomplish this. The purpose here is to distribute jobs over processing units, distributing the load as evenly as possible. Suggestions very welcome! -- Ron Aaron, CTO Aaron High-Tech, Ltd. +1 425.296.0766 +972 52.652.5543 GPG Key: 91F92EB8 <h

[sqlite] Getting a crash on 32-bit Linux

2015-04-15 Thread Ron Aaron
Perhaps something to do with compiler flags, though I don't set the 'arch' or 'tune' to anything. So. Problem solved, and nothing really to do with sqlite per se; but I do wish compilers would do less on my behalf... -- Ron Aaron, CTO Aaron High-Tech, Ltd. +972.52.652.5543 <http://8th-dev.com>

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
On 4/14/15 21:06, Richard Hipp wrote: > On 4/14/15, Ron Aaron wrote: >> Something is very wrong, then. The file I downloaded from the >> sqlite.org site, and unzipped, has these: > Yes. My previous email had the wrong version of sqlite3.. Version > 3.8.9 states: >

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
Yes: I issued the command: unzip ~/Downloads/sqlite-amalgamation-3080900.zip file reports: Downloads/sqlite-amalgamation-3080900.zip: Zip archive data, at least v1.0 to extract md5 sum: 02e9c3a6daa8b8587cf6bef828c2e33f On 4/14/15 21:05, Nelson, Erik - 2 wrote: > Ron Aaron wrote

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
376915 Apr 8 17:38 sqlite3.h -rw-r--r--@ 1 ron staff27763 Apr 8 17:38 sqlite3ext.h ~/src/sqlite-amalgamation-3080900$ md5 sqlite3.c MD5 (sqlite3.c) = a99b92d9e510a8107999c474dca017d7 On 4/14/15 20:41, Richard Hipp wrote: > On 4/14/15, Ron Aaron wrote: >> >> On 4/1

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
On 4/14/15 18:13, Dan Kennedy wrote: > On 04/14/2015 10:00 PM, Ron Aaron wrote: >> Just updated with the version from sqlite.org and have the same problem: > > The line numbers still don't match the 3.8.9 amalgamation on the > website. Are you running [make sqlite3.c]

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
te3_open (zFilename=0x91a1610 "test.db", ppDb=0x91a2028) at sqlite3.c:127601 On 4/14/15 17:31, Ron Aaron wrote: > I'm using the one from fossil... > > > On 4/14/15 17:12, Richard Hipp wrote: >> On 4/14/15, Ron Aaron wrote: >>> I just updated

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
I'm using the one from fossil... On 4/14/15 17:12, Richard Hipp wrote: > On 4/14/15, Ron Aaron wrote: >> I just updated to the 3.8.9 version of SQLite for my project, and am >> compiling for 32-bit linux (on a 64-bit box). >> >> >> I'm getting a c

[sqlite] Getting a crash on 32-bit Linux

2015-04-14 Thread Ron Aaron
-DSQLITE_OMIT_DEPRECATED -DSQLITE_ENABLE_LOCKING_STYLE=0 -DSQLITE_SYSTEM_MALLOC=1 -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_TRACE -O0 -c -o sqlite3.o sqlite3.c The crash occurs whether I work in a chroot lin 32 environment or a virtual machine running 'native'. The test application is statically

Re: [sqlite] last modified time or version of sqlite database

2006-04-03 Thread Ron Aaron
On Mon, April 3, 2006 15:49, Chris Fletcher wrote: >> > > Thanks - but this seems to give the number of changes during the > lifetime of a db session. With CGI the sessions will be short lived. > On a new session I want to know when the db wa

Re: [sqlite] How to cross compile sqlite-3.2.7 for arm9 s3c2410?

2005-09-28 Thread Ron Aaron
On Tue, September 27, 2005 7:39, Frank van Vugt said: > There's some info in the wiki on it, but basically the steps are: Hello, Frank - I successfully created an ARM sqlite3 (3.2.7) and it is running on my Archos PMA400 - thanks! I have noticed that when I create a database and do a simple IN

Re: [sqlite] Using expressions for 'DEFAULT

2004-10-31 Thread Ron Aaron
On Sun, October 31, 2004 3:58, D. Richard Hipp said: >> However, this statement is not parsed by SQLite: >> >> CREATE TABLE a ( b datetime DEFAULT date('now')); > Changes to implement this capability are already in the > works and will be available within the next two months. > Stay tuned... Oo

[sqlite] Using expressions for 'DEFAULT

2004-10-30 Thread Ron Aaron
I would like to have the default for a date field be the current date. Right now, I am using a post-insert trigger and modify the date; but I was hoping to be able to use the 'default' clause of the table schema. However, this statement is not parsed by SQLite: CREATE TABLE a ( b datetime DEFAUL

Re: [sqlite] Parameterized queries -- howto?

2004-10-21 Thread Ron Aaron
On Thu, October 21, 2004 7:51, Clay Dowling said: > Ron, > > Take a look at the example application in the Linux Journal article > http://www.linuxjournal.com/article.php?sid=7803 > > The parameterized queries provide a much better solution than sprintf. > You can grab a complete working app from

Re: [sqlite] Parameterized queries -- howto?

2004-10-20 Thread Ron Aaron
On Wed, October 20, 2004 18:05, Vladimir Vukicevic said: > I'm confused -- it doesn't make them useless in practice, they can be > used exactly for what they're intended for (precompiled statements). > What exactly are you trying to do? And what other database supports > this? I misspoke. They

Re: [sqlite] Parameterized queries -- howto?

2004-10-20 Thread Ron Aaron
On Wed, October 20, 2004 15:35, Vladimir Vukicevic said: > On Wed, 20 Oct 2004 15:15:44 -0700 (PDT), Ron Aaron <[EMAIL PROTECTED]> wrote: >> Thanks. I know it can be done in the C API, that was not the question. The >> question was, can it be done *using SQL* ? > > No

Re: [sqlite] Parameterized queries -- howto?

2004-10-20 Thread Ron Aaron
On Wed, October 20, 2004 14:57, Kurt Welgehausen said: >> Am I missing something? > > Yes. Go to , click on , and > read the C/C++ API Reference. Thanks. I know it can be done in the C API, that was not the question. The question was, can it be done *using SQL* ? -- My GPG public key is at

[sqlite] Parameterized queries -- howto?

2004-10-20 Thread Ron Aaron
I don't see any way to use parameterized queries from SQLite's version of SQL. Am I missing something? -- My GPG public key is at http://ronware.org/ fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D

Re: [sqlite] Wich compiler to use in Windows

2004-10-20 Thread Ron Aaron
On Wed, October 20, 2004 5:41, Rubens Jr. said: > Wich compiler do you recomend to use to compile sqlite3.0.8 in Windows ? I use the mingw32 port of the gcc compiler (www.mingw.org) with great success. It has the advantage that it is the (essentially) same compiler used on Linux systems. --

Re: [sqlite] CSV mode not correctly quoting output

2004-10-06 Thread Ron Aaron
On Wed, October 6, 2004 10:15, b.bum said: > I'll file a bug on this. Anyone know how to file a bug such that the > formating isn't smushed into a single line? I already logged a bug (#911) along with a fix -- My GPG public key is at http://ronware.org/ fingerprint: 8130 734C 69A3 6542 0853

[sqlite] How to use parameterized queries from the shell?

2004-09-29 Thread Ron Aaron
I don't see that the query language has provisions for doing parameterized queries from e.g. the shell. Did I miss something? -- My GPG public key is at http://ronware.org/ fingerprint: 8130 734C 69A3 6542 0853 CB42 3ECF 9259 AD29 415D

[sqlite] How to 'flatten' query results?

2004-09-22 Thread Ron Aaron
In my membership database, I have a 'people' table and a 'userviews' table. This second table consists of a (name,sql) pair. What it does is allow my users to load a particular list of people from the people table. So for example, ('LA','where city like "LA"') might be the entry for a "view" cal

Re: [sqlite] ON INSERT trigger

2004-09-21 Thread Ron Aaron
On Tue, September 21, 2004 11:26, Christian Smith said: > On Tue, 21 Sep 2004, Alex wrote: > > In which case it might be better to convert the replace insert into an > update, and use the update trigger which is guaranteed to have valid OLD > and NEW. > > But that is not my decision to make. Crea

[sqlite] For vim users: dbext.vim supports sqlite now

2004-09-14 Thread Ron Aaron
>From the vim mailing list: (David Fishburn, the author, says:) I am pleased to announce an update to dbext to version 2.10. http://vim.sourceforge.net/scripts/script.php?script_id=356 This release has increased the supported databases to 10 by adding SQLite (www.sqlite.org). -- My GPG public k

[sqlite] PATCH: [sqlite] sqlite output request: .mode csv

2004-09-13 Thread Ron Aaron
On Mon, September 13, 2004 12:14, Ron Aaron said: Responding to my own complaint: here is a patch against current CVS version, fixing the typo in the '-help' and implementing ".mode cvs" properly (at least, in my opinion) -- My GPG public key is at http://ronware.org/ fi

Re: [sqlite] sqlite output request: .mode csv

2004-09-13 Thread Ron Aaron
On Mon, September 13, 2004 8:28, Ron Aaron said: > I have been asked to output an 'Excel'-friendly report for someone, which > means dumping a "CSV" (Comma Separated Values) file. > > Setting ".separator ',' " gets me part of the way. Unf

[sqlite] sqlite output request: .mode csv

2004-09-13 Thread Ron Aaron
I have been asked to output an 'Excel'-friendly report for someone, which means dumping a "CSV" (Comma Separated Values) file. Setting ".separator ',' " gets me part of the way. Unfortunately, I need to manually quote strings using something like this: SELECT '"' || name || '"', '"' || address |

Re: [sqlite] DLL Version

2004-08-31 Thread Ron Aaron
On Tue, August 31, 2004 6:11, D. Richard Hipp said: > Steve O'Hara wrote: >> I obviously noticed the changed API from 2.8.15 to 3.x.x but one change has >> left me a little puzzled - the sqlite_libversion call has been removed. >> This means that I can no longer determine the version of the DLL I'

Re: [sqlite] An update with LIMIT ?

2004-06-11 Thread Ron Aaron
On Fri, June 11, 2004 12:50, Jay Macaulay said: > Hi all, > > I have a database where I'm selecting rows using LIMIT. Is there a way I > could use LIMIT in an update? For example right now I do: > > SELECT * FROM address WHERE group="a" LIMIT 5; > > Is there some way I could instantly update thos

[sqlite] Re: 'cating' sqlite databases

2004-04-08 Thread Ron Aaron
On Thursday 08 April 2004 01:49 pm, Stathy G Touloumis wrote: > Hi, > > We are working on a potential architecture by which many sqlite databases > are created. There may be a need to aggregate data between databases and I > was wondering if it's possible to quickly just 'cat' the databases togeth

[sqlite] Re: sqlite.org ISP problems

2004-03-31 Thread Ron Aaron
On Wednesday 31 March 2004 07:30 am, D. Richard Hipp wrote: > > 2. If you can recommend a good ISP, please do so. I'm hosting my site via dyndns.org, which works well for me. -- My GPG public key is at http://ronware.org/ fingerprint: 4E91 06E9 2020 114C 8BCD 55B2 0816 60AF 2B3D 4C51

[sqlite] Re: Quick import

2004-03-29 Thread Ron Aaron
On Monday 29 March 2004 09:14 am, Dembskey, E. (Evan) wrote: > Hi again, > > Is there a quick way to import a text file into a sqlite db? I have 110 > records, and would naturally prefer not to manually enter them. If there is > a way to get the field names from the same file, so much the better...

[sqlite] Re: Changing values from triggers

2004-03-29 Thread Ron Aaron
ify the new.* or old.* inside a trigger, but you can accomplish what you want like this: -- File:test.sql -- Description: Test file for Avner Levy -- Author: Ron Aaron -- Created: Sun 28 Mar 2004 11:21:21 -- Last updated:Mon 29 Mar 2004 08:4

[sqlite] Re: SQLite quite popular

2004-03-17 Thread Ron Aaron
On Wednesday 17 March 2004 06:57 am, Chris Sebrell wrote: > I just recently found out about SQLite from a copy of the C/C++ Users > Journal that a co-worker left on my desk. After reading just the first > couple paragraphs of the article I said "Shazam! Just what I was looking > for all this time

[sqlite] Re: Report writer

2004-03-16 Thread Ron Aaron
On Tuesday 16 March 2004 06:42 am, Griggs, Donald wrote: > > Are you developing for Windows? If so, I don't know if one of these might > be of help: > > 1) I see there's a commercial, but not expensive product (US$40), > SqliteManager Thanks, Donald (and other who've responded). I will investi

[sqlite] Re: Report writer

2004-03-14 Thread Ron Aaron
On Sunday 14 March 2004 10:17 am, Will Leshner wrote: > What kind of features are you looking for in such a report writer? My program is a membership management database. The db has a list of people, with various information about them distributed over several tables. For example, the 'people' t

[sqlite] Report writer

2004-03-14 Thread Ron Aaron
Hi all - Does anyone have a generic report writer which could be used with SQLite? I keep getting requests for the ability to have 'user created' reports, and I don't want to rewrite something someone else has done already if possible. I also can't afford a commercial solution, as this is for n

[sqlite] Patch for MingW32 build on Windows

2004-02-24 Thread Ron Aaron
Hi all - I'm attaching my very tiny diffs to make the MingW32 compile on Windows generate a good sqlite.dll and a sqlite.exe which uses the dll. It also produces a libsqlite.a so you can link in other apps. The zip contains: Length Date TimeName

[sqlite] Re: Seg fault on Linux and Windows using sqlite cmd line tool

2004-02-13 Thread Ron Aaron
On Friday 13 February 2004 09:19 am, Will Leshner wrote: > On Feb 13, 2004, at 9:06 AM, Ron Aaron wrote: > > Another crash :-( > I think that's probably just a bug in the sqlite tool itself and not in Yes, that's why I said "using sqlite cmd line tool", and not &q

[sqlite] Seg fault on Linux and Windows using sqlite cmd line tool

2004-02-13 Thread Ron Aaron
Another crash :-( Try this: sqlite bad.db "create table joe (a);" from a shell prompt (bash on Linux or cmd.exe on Windows) On Linux you get 'Segmentation fault' and you get the usual 'this application...' dialog on Windows. -- My GPG public key is at http://ronware.gotdns.com/ fingerprint: 4

[sqlite] Re: Windows port problem

2004-02-13 Thread Ron Aaron
On Friday 13 February 2004 06:09 am, D. Richard Hipp wrote: > Ron Aaron wrote: > > 2.8.12 crashes (mingw version on Windows) ((it works fine on Linux)) > An uninitialized variable bug was introduced by check-in [1202] on > 2004-Jan-30. It has just now been fixed by check-in [12

[sqlite] Windows port problem

2004-02-12 Thread Ron Aaron
Hi - 2.8.12 crashes (mingw version on Windows) ((it works fine on Linux)) Do this : sqlite < bad.sql Where bad.sql is: CREATE TABLE emails (id, text); INSERT INTO emails VALUES(1,'hi'); INSERT INTO emails VALUES(2,'there'); CREATE TABLE flags (flag, name); INSERT INTO flags values (1, 'drop')

[sqlite] Complex query question ...

2004-02-11 Thread Ron Aaron
Hi again :-) I have a database with a layout like: create table people ( id, name ); create table phones (id, type, phone); And my application sends me diffs from other users of the system, where the diffs are another db with the same tables as the main db, but with records which have been modifi

[sqlite] Re: Using SQLite

2004-02-01 Thread Ron Aaron
On Sunday 01 February 2004 04:06 pm, Demitri Muna wrote: > Hello, Hi, Demitri - > I need to embed a database into my application, and was referred to > SQLite. I narrowed down my options to it and PostgreSQL (which I am not > completely sure I can embed into an app). One thing that I need to be >

[sqlite] Re: random record

2004-01-14 Thread Ron Aaron
On Wednesday 14 January 2004 09:32 am, Caleb Groom wrote: > Does sqlite have some way to fetch a random record? I'm looking for > something similar to MySQL's 'select * from tbl order by rand() limit > 1'. Same thing: SELECT * FROM tbl ORDER BY random() LIMIT 1; works for me.

Re: [sqlite] How do I coalesce values in a join?

2003-12-22 Thread Ron Aaron
On Mon, Dec 22, 2003 at 03:27:27PM -0700, Dennis Cote wrote: > > > I'm all ears for better ideas :-) > > > > Shouldn't this query be checking the type of the phone records? I think you > need something like the following query to get the correct type of phone > number in each column. Yes, that's

Re: [sqlite] How do I coalesce values in a join?

2003-12-22 Thread Ron Aaron
On Mon, Dec 22, 2003 at 02:52:14PM -0600, Scott Lamb wrote: > Otherwise, you can do it in this limited situation with a kludgy query, > something like: > > selectpeople.id, > people.first, > people.last, > home.phone as home, > cell.phone as cell, >

[sqlite] How do I coalesce values in a join?

2003-12-22 Thread Ron Aaron
Hi all - This may be a boneheaded question, but I cannot figure out how to accomplish what I want. I have two tables: people (id,first,last) and phones (id, type, phone) Where each person in the 'people' table might have up to four phones. I can easily get a report of phones by joining th