On Jan 20, 2008 9:16 PM, Ken <[EMAIL PROTECTED]> wrote:
> Jay
>
> I've used a trigger to do this with good success.
>
> You'll need one trigger per table to cause the delete to cascade through
> the tree.
>
> Or if you know that you will always delete from the top level tree"parent"
> then
> In response to the deletion of (0,null), the trigger fired, deleting
> (1,0), and (2,0). But the trigger didn't fire again in response to
> either of these subsequent deletions, so (3,1) was not automatically
> deleted.
>
> If anyone knows how to get around this problem, I would like to know.
On Sun, 20 Jan 2008 19:16:03 -0800 (PST), Ken wrote
> Jay Sprenkle <[EMAIL PROTECTED]> wrote:
>> I'm deleting a tree of data stored in sqlite and was looking for the
>> most efficient way to do it.
>
> You'll need one trigger per table to cause the delete to cascade
> through the tree.
Watch out.
Jay
I've used a trigger to do this with good success.
You'll need one trigger per table to cause the delete to cascade through the
tree.
Or if you know that you will always delete from the top level tree"parent"
then just one trigger would probably suffice.
Ken
Jay
I'm deleting a tree of data stored in sqlite and was looking for the
most efficient way to do it.
I thought the best solution was to delete the row and then delete all
the orphaned rows the referenced it in a loop
delete from category where id = 5;
To delete the orphaned rows I repeat one of the
Cory Nelson wrote:
Hello folks.
I currently have a table:
create table t_gloss(entryid integer, type integer, value text);
and am running this SQL on it:
select entryid,type from t_gloss where value=?;
then for each row returned (type is type==0?1:0 from above row, and
entryid is the same):
select
Hello folks.
I currently have a table:
create table t_gloss(entryid integer, type integer, value text);
and am running this SQL on it:
select entryid,type from t_gloss where value=?;
then for each row returned (type is type==0?1:0 from above row, and
entryid is the same):
select value from
7 matches
Mail list logo