Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread Simon Slavin
On 6 Jul 2009, at 6:34am, James Gregurich wrote: > The inability of "INSERT OR REPLACE" to maintain referential integrity > leaves me with no mechanism to implement a feature in my project that > I was intending to provide. Are there any plans to add in the > functionality for "INSERT OR

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread Simon Slavin
(Sorry, hit 'Send' before I meant to.) On 6 Jul 2009, at 6:34am, James Gregurich wrote: > a question for the sqlite developers. > > The inability of "INSERT OR REPLACE" to maintain referential integrity > leaves me with no mechanism to implement a feature in my project that > I was intending to

[sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Andy Froncioni
I know I'm probably doing something wrong, but I can't seem to get a simple UPDATE...LIMIT query working. sqlite> UPDATE customers SET lock=1 WHERE lock!=1 LIMIT 10; SQL error: near "LIMIT": syntax error I have compiled sqlite3 with the following configure options: % CFLAGS="-Os

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
On Jul 6, 2009, at 11:08 PM, Andy Froncioni wrote: > I know I'm probably doing something wrong, but I can't seem to get > a simple UPDATE...LIMIT query working. > > sqlite> UPDATE customers SET lock=1 WHERE lock!=1 LIMIT 10; > SQL error: near "LIMIT": syntax error > > > I have compiled sqlite3

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Andy Froncioni
On 6-Jul-09, at 12:18 PM, Dan wrote: > > On Jul 6, 2009, at 11:08 PM, Andy Froncioni wrote: > >> I know I'm probably doing something wrong, but I can't seem to get >> a simple UPDATE...LIMIT query working. >> >> sqlite> UPDATE customers SET lock=1 WHERE lock!=1 LIMIT 10; >> SQL error: near

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread D. Richard Hipp
On Jul 6, 2009, at 1:03 PM, Andy Froncioni wrote: >> >> You will need to build from the source tarball (the one with the >> unsupported configure script), not the amalgamation package for >> this to work. > > Thanks a bunch. I'll try that... > > But I don't remember reading that the tarball I

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Andy Froncioni
On 6-Jul-09, at 1:20 PM, D. Richard Hipp wrote: > At http://www.sqlite.org/compile.html under section 1.6, it says you > cannot use SQLITE_OMIT_ compile-time options with the amalgamation. > The documentation never says you cannot use > SQLITE_ENABLE_UPDATE_DELETE_LIMIT with the amalgamation, but

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Andy Froncioni
> On Jul 6, 2009, at 11:08 PM, Andy Froncioni wrote: > >> I know I'm probably doing something wrong, but I can't seem to get >> a simple UPDATE...LIMIT query working. >> >> sqlite> UPDATE customers SET lock=1 WHERE lock!=1 LIMIT 10; >> SQL error: near "LIMIT": syntax error >> >> >> I have compiled

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
On Jul 7, 2009, at 1:56 AM, Andy Froncioni wrote: >> On Jul 6, 2009, at 11:08 PM, Andy Froncioni wrote: >> >>> I know I'm probably doing something wrong, but I can't seem to get >>> a simple UPDATE...LIMIT query working. >>> >>> sqlite> UPDATE customers SET lock=1 WHERE lock!=1 LIMIT 10; >>> SQL

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread James Gregurich
so you are suggesting that I put an INSERT in a C loop checking for a constraint violation failure. if I get one, I use errmsg to get the "column is not unique" message and extract . Then, I issue a DELETE to clear out rows that match the value of . is that correct? On Jul

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Jay A. Kreibich
On Mon, Jul 06, 2009 at 01:22:52PM -0400, Andy Froncioni scratched on the wall: > > On 6-Jul-09, at 1:20 PM, D. Richard Hipp wrote: > > At http://www.sqlite.org/compile.html under section 1.6, it says you > > cannot use SQLITE_OMIT_ compile-time options with the amalgamation. > > The

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread Simon Slavin
Please quote previous text above your response to it. We read English top to bottom. On 6 Jul 2009, at 8:22pm, James Gregurich wrote: > On Jul 6, 2009, at 3:53 AM, Simon Slavin wrote: > >> It should not call DELETE triggers since it never deletes. It should >> call either INSERT triggers or

[sqlite] Query by Day

2009-07-06 Thread Rick Ratchford
Greetings! I'm having trouble with what I thought would be a simple SQL query. SQLString = "SELECT strftime('%d', Date) as Day, IsSwingTop1 as Tops, IsSwingBtm1 as Btms " & _ "FROM TmpTable WHERE Day = 11" I'm trying to create a recordset where the only records returned

Re: [sqlite] Query by Day

2009-07-06 Thread Simon Davies
2009/7/6 Rick Ratchford : > Greetings! > Hi Rick, > I'm having trouble with what I thought would be a simple SQL query. > >    SQLString = "SELECT strftime('%d', Date) as Day, IsSwingTop1 as Tops, > IsSwingBtm1 as Btms " & _ >                "FROM TmpTable WHERE Day =

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread James Gregurich
1) Why on earth would you want to scroll all the way to the bottom of a long email to get the response simply for the sake of "We read English top to bottom." 2) This is going to be a challenge for me because I'm not writing a fixed DB with a known schema. I'm writing a higher-level data

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-06 Thread Nicolas Williams
On Sat, Jul 04, 2009 at 10:24:50AM +0200, Kees Nuyt wrote: > On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich > wrote: > > > > >nuts. that makes INSERT OR REPLACE worthless if you have tables > >dependent on one another. > > > > > >Is there any way to manually get a

Re: [sqlite] referential integrity and INSERT OR REPLACE

2009-07-06 Thread James Gregurich
based on the test I just ran, it reports the first one encountered only. On Jul 6, 2009, at 2:53 PM, Nicolas Williams wrote: > On Sat, Jul 04, 2009 at 10:24:50AM +0200, Kees Nuyt wrote: >> On Fri, 03 Jul 2009 14:38:43 -0700, James Gregurich >> wrote: >> >>> >>> nuts. that

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread Nicolas Williams
On Mon, Jul 06, 2009 at 02:49:07PM -0700, James Gregurich wrote: > 1) Why on earth would you want to scroll all the way to the bottom of > a long email to get the response simply for the sake of "We read > English top to bottom." Any quoted context must be read before the reply or else is not

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread James Gregurich
On Jul 6, 2009, at 3:14 PM, Nicolas Williams wrote: > On Mon, Jul 06, 2009 at 02:49:07PM -0700, James Gregurich wrote: >> 1) Why on earth would you want to scroll all the way to the bottom of >> a long email to get the response simply for the sake of "We read >> English top to bottom." > > Any

Re: [sqlite] plans for completion of INSERT OR REPLACE INTO?

2009-07-06 Thread Simon Slavin
On 6 Jul 2009, at 11:59pm, James Gregurich wrote: > How's this... > > you have a pretty low threshold for "obnoxious." Frankly, I lack the > desire and energy needed to keep up with the list of rules people make > up. read the email or don't. He didn't make up the rule. Nor did I. It's part

[sqlite] Replying to posts (was: plans for completion of INSERT OR REPLACE INTO?)

2009-07-06 Thread BareFeet
> He didn't make up the rule. Nor did I. It's part of the standard > for mailing lists and usenet: > > > > "- If you are sending a reply to a message or a posting be sure you > summarize the original at the top of the message, or include just >

Re: [sqlite] Replying to posts (was: plans for completion of INSERT ORREPLACE INTO?)

2009-07-06 Thread Dennis Volodomanov
> > He didn't make up the rule. Nor did I. It's part of the standard > > for mailing lists and usenet: > > > > To be fair, there's no such thing as a "standard" in this matter - the very first paragraph of that document says so. Each mailing list has its

Re: [sqlite] Query by Day

2009-07-06 Thread Rick Ratchford
Hi Simon. Ah. So what I need to do then is to make the return of strftime of type INT. Since I'm creating a recordset from an existing table (rather than creating a table itself), then I don't have the option to set the affinity of my newly created column Day to INT. Can CAST(strftime('%d',

[sqlite] there is problem when getting data by sqlite3's c apis in signal-handling func

2009-07-06 Thread liubin liu
there is problem when getting data by sqlite3's c apis in signal-handling func. _ #include // for printf() #include // for signal() #include // for alarm() #include // for system() #include // for