Re: [sqlite] question about instead of delete triggers

2005-10-30 Thread Mark de Vries
On Sun, 30 Oct 2005, Dan Kennedy wrote: > When you execute this SQL: "delete from v_items where item='me'", > SQLite essentially does: > > FOR EACH ROW IN "select FROM v_items where item='me'" { > > Execute trigger program > > } That makes perfext se

[sqlite] question about instead of delete triggers

2005-10-30 Thread Mark de Vries
Hi, I guess my question is: are conditions in the where clause of a instead of delte trigger ignored if the referenced columns are not in the where clause of the orig delete? But perhaps an example of my 'problem': create table item ( id integer primary key, name text, catid integer

Re: [sqlite] Left Outer Joins

2005-10-07 Thread Mark de Vries
On Thu, 6 Oct 2005, Brett Wilson wrote: > I believe saying "GROUP BY a.primarykey" clause at the end of your > query will do what you want. It's explained in I would try something like: select sa.dbsource, sa.signid, sa.recid, sa.majorlvl, sa.lvl6 from sampsign sa where sa.dbsource = 'Smith'

RE: [sqlite] CROSS keyword disables certain join optimizations

2005-09-11 Thread Mark de Vries
On Sat, 10 Sep 2005, Ned Batchelder wrote: > Rather than overload an existing SQL keyword, would it be possible to > provide pragmas to control the optimizer? Assigning meanings to particular > combinations of SQL queries won't scale as the number of optimizer controls > grows. I would like to

RE: [sqlite] SUM and NULL values

2005-09-08 Thread Mark de Vries
On Thu, 8 Sep 2005, Marcus Welz wrote: > Yes, the NULL as it is returned by SUM means "No data to answer your > question". > > If that query returned 0 (as SQLite currently does), rather than NULL (as > the standard specifies), it would not allow me to figure out whether I sold > $0 worth of

Re: [sqlite] Why can i open a textfile?

2005-08-22 Thread Mark de Vries
On Mon, 22 Aug 2005, Edwin Knoppert wrote: > Confirmed but open still opens the textfile, i wish it cancelled that as > well. > There is no use to an open textfile for sqlite. > I must say I agree. Perhaps there is some verry good reason to delay actually opening the DB untill the first real

Re: [sqlite] Can a trigger update more than one column?

2005-08-21 Thread Mark de Vries
On Sun, 21 Aug 2005, Mark de Vries wrote: > > > I have tried two versions of the trigger: > > > > > > CREATE TRIGGER task_list_1 > > > AFTER INSERT ON task_list > > > BEGIN > > > UPDATE task_list > >

Re: [sqlite] Can a trigger update more than one column?

2005-08-21 Thread Mark de Vries
On Sun, 21 Aug 2005, Puneet Kishor wrote: > > On Aug 21, 2005, at 9:20 AM, <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > There was some recent discussion about timestamp triggers, something I > > have been trying to get working on my own. Specifically, I have two > > fields, insert_ts and

Re: [sqlite] modifying insert/updat data in triggers (was: manipulating new.? in triggers)

2005-08-18 Thread Mark de Vries
On Thu, 18 Aug 2005, Kurt Welgehausen wrote: > > Is it possible to change the values of certain rows that > > are inserted into the database? ... > > I think everything you need is explained at > > . Yeah, I've read it. > If you don't

[sqlite] manipulating new.? in triggers

2005-08-18 Thread Mark de Vries
Hi, Is it possible to change the values of certain rows that are inserted into the database? Let say I have a col that records the date the row it was entered. On insert I want to set it, and on update I want to make sure it's never altered. Also I have a col that records the date it was last