Re: [sqlite] another challenging query

2014-06-20 Thread David Cotter
you guys are flippin' gods ya know that right? thanks! On Jun 19, 2014, at 10:26 PM, Igor Tandetnik wrote: > On 6/20/2014 1:20 AM, David M. Cotter wrote: >> i want to delete from the table all records with plID = 1, but ONLY those >> that have a corresponding record where plID == 851090 and wh

[sqlite] another challenging query

2014-06-20 Thread David M. Cotter
here's a table: i want to delete from the table all records with plID = 1, but ONLY those that have a corresponding record where plID == 851090 and where that record's soID matches the one where plID = 1 so the query should delete rows 8-12, but leave 1-2 intact (and also leave 3-7) there ma

Re: [sqlite] another challenging query

2014-06-20 Thread RSmith
On 2014/06/20 07:20, David M. Cotter wrote: i want to delete from the table all records with plID = 1, but ONLY those that have a corresponding record where plID == 851090 and where that record's soID matches the one where plID = 1 so the query should delete rows 8-12, but leave 1-2 intact (a

Re: [sqlite] another challenging query

2014-06-19 Thread David M. Cotter
you guys are flippin' gods ya know that right? thanks! On Jun 19, 2014, at 10:26 PM, Igor Tandetnik wrote: > On 6/20/2014 1:20 AM, David M. Cotter wrote: >> i want to delete from the table all records with plID = 1, but ONLY those >> that have a corresponding record where plID == 851090 and wh

Re: [sqlite] another challenging query

2014-06-19 Thread Igor Tandetnik
On 6/20/2014 1:20 AM, David M. Cotter wrote: i want to delete from the table all records with plID = 1, but ONLY those that have a corresponding record where plID == 851090 and where that record's soID matches the one where plID = 1 delete from MyTable where plID = 1 and soID in ( select t2

Re: [sqlite] another challenging query

2014-06-19 Thread David M. Cotter
> here's a table: the list helpfully deletes enclosed pictures, even if they're wicked small.. here's the actual table: http://karaoke.kjams.com/screenshots/table.png ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/ma

[sqlite] another challenging query

2014-06-19 Thread David M. Cotter
here's a table: i want to delete from the table all records with plID = 1, but ONLY those that have a corresponding record where plID == 851090 and where that record's soID matches the one where plID = 1 so the query should delete rows 8-12, but leave 1-2 intact (and also leave 3-7) there ma