Re: [sqlite] Using a select with 'where'

2012-05-01 Thread Black, Michael (IS)
ating Unit Northrop Grumman Information Systems From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on behalf of Simon [turne...@gmail.com] Sent: Tuesday, May 01, 2012 2:08 PM To: General Discussion of SQLite Database Subject: EXT :Re: [sql

Re: [sqlite] Using a select with 'where'

2012-05-01 Thread Simon
> >> delete from addressbook where absid=(select personnick from grouplinks > where > >> groupnick='27') > >> > >> The 'select personnick ...' can return zero, one, or many results, and > I'd > >> like to have the 'delete from ...' delete zero, one, or many rows from > the > >> addressbook table.

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
On 27 Apr 2012 at 22:16, Simon Slavin wrote: > On 27 Apr 2012, at 9:00pm, Tim Streater wrote: >> delete from addressbook where absid=(select personnick from grouplinks where >> groupnick='27') >> >> The 'select personnick ...' can return zero,

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Simon Slavin
On 27 Apr 2012, at 9:00pm, Tim Streater wrote: > > delete from addressbook where absid=(select personnick from grouplinks where > groupnick='27') > > The 'select personnick ...' can return zero, one, or many results, and I'd > like to have the 'delete from ...'

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
On 27 Apr 2012 at 21:03, Stephan Beal wrote: > On Fri, Apr 27, 2012 at 10:00 PM, Tim Streater wrote: > >> delete from addressbook where absid=(select personnick from grouplinks >> where groupnick='27') > > i think what you want is IN instead of =.

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Stephan Beal
On Fri, Apr 27, 2012 at 10:00 PM, Tim Streater wrote: > delete from addressbook where absid=(select personnick from grouplinks > where groupnick='27') > i think what you want is IN instead of =. -- - stephan beal http://wanderinghorse.net/home/stephan/

[sqlite] Using a select with 'where'

2012-04-27 Thread Tim Streater
I'd like to delete multiple rows using the following syntax, but experiment appears to show that at most one row is deleted. I tried the following: delete from addressbook where absid=(select personnick from grouplinks where groupnick='27') The 'select personnick ...' can return zero, one,