Re: Alternative for NOT EXISTS

2002-10-13 Thread Michael T. Babcock
John Ragan wrote: >try corereader. it will run queries against your >mysql, oracle, and ms sql server (and anything else >laying around). you can switch between your servers >with a click. > > Am I the only one getting tired of these non-SQL related advertising responses? Feel free to pu

Re: Alternative for NOT EXISTS

2002-10-12 Thread John Ragan
ok. > At 10:10 -0400 10/11/02, Michael T. Babcock wrote: > >John Ragan wrote: > > > >>try corereader. it will run queries against your mysql, oracle, > >>and ms sql server (and anything else laying around). you can > >>switch between your servers with a click. > >> > >Am I the only one gett

Re: Alternative for NOT EXISTS

2002-10-12 Thread Paul DuBois
At 10:10 -0400 10/11/02, Michael T. Babcock wrote: >John Ragan wrote: > >>try corereader. it will run queries against your mysql, oracle, >>and ms sql server (and anything else laying around). you can >>switch between your servers with a click. >> >Am I the only one getting tired of these non-

Re: Alternative for NOT EXISTS

2002-10-11 Thread Michael T. Babcock
Victor Kirk wrote: >>If so, this should work: >> >> SELECT u.uname >> FROM users u >> LEFT JOIN team_members t ON u.user_id =3D t.user_id >>AND t.team_id =3D 7 >> WHERE t.team_id is NULL >> >> > >Perfect :-) thanks very much this query works perfectly, you are a star. > > I'd like

RE: Re: Alternative for NOT EXISTS

2002-10-11 Thread Victor Kirk
>> SELECT u.uname FROM users u >> WHERE NOT EXISTS (SELECT * FROM team_members=20 >> WHERE team_id =3D 7 AND user_id=3Du.user_id); >It sounds to me like you are trying to ask the database: > "Tell me all the users that aren't in team 7." Yes. > If so, this should work

Re: Alternative for NOT EXISTS

2002-10-10 Thread John Ragan
i appologize for sending unnecessary mail, but after hurrying off that last response, i realized that you are running oracle. please be aware that you have not encountered a shortcoming in mysql. i refer you to the section in corereader's documentation concerning oracle's non- standard ch

Re: Alternative for NOT EXISTS

2002-10-10 Thread John Ragan
try corereader. it will run queries against your mysql, oracle, and ms sql server (and anything else laying around). you can switch between your servers with a click. peter brawley gives your answer in another message, but you can quickly work out those simple queries with point and click

RE: Alternative for NOT EXISTS

2002-10-10 Thread Robert Citek
Hello Victor, At 04:30 PM 10/10/2002 +0100, Victor Kirk wrote: >>> Can anyone help me? Ideally I would like something that would >>> be portable to oracle/sql server. Efficiency is not an issue. > >> How about ... > >>SELECT * FROM teams >>LEFT JOIN users USING (team_id) >>WHERE u

RE: Alternative for NOT EXISTS

2002-10-10 Thread Jan Muszynski
On 10 Oct 2002 at 16:30, Victor Kirk wrote: > >> I have two tables, one for user details and another to indicate > >> membership of some team. The later has user_id and team_id. I > >> want to select all users that are NOT in a particular team. > >> > >> After a lot of effort (my sql skills ar

Re: Re: Alternative for NOT EXISTS

2002-10-10 Thread Rodney Broom
From: Victor Kirk <[EMAIL PROTECTED]> > SELECT u.uname FROM users u > WHERE NOT EXISTS (SELECT * FROM team_members=20 > WHERE team_id =3D 7 AND user_id=3Du.user_id); It sounds to me like you are trying to ask the database: "Tell me all the users that aren't in team 7."

Re: Alternative for NOT EXISTS

2002-10-10 Thread Paul DuBois
At 12:21 +0100 10/10/02, Victor Kirk wrote: >Hi, > >I have two tables, one for user details and another to indicate >membership of some team. The later has user_id and team_id. I >want to select all users that are NOT in a particular team. > >After a lot of effort (my sql skills are almost no exi

re: Alternative for NOT EXISTS

2002-10-10 Thread Egor Egorov
Victor, Thursday, October 10, 2002, 2:21:44 PM, you wrote: VK> I have two tables, one for user details and another to indicate VK> membership of some team. The later has user_id and team_id. I VK> want to select all users that are NOT in a particular team. VK> After a lot of effort (my sql ski

RE: Alternative for NOT EXISTS

2002-10-10 Thread Victor Kirk
>> I have two tables, one for user details and another to indicate >> membership of some team. The later has user_id and team_id. I >> want to select all users that are NOT in a particular team. >> >> After a lot of effort (my sql skills are almost no existent) I >> have the following that work

Re: Alternative for NOT EXISTS

2002-10-10 Thread Peter Brawley
Victor, > I have two tables, one for user details and another to indicate > membership of some team. The later has user_id and team_id. I > want to select all users that are NOT in a particular team. > > After a lot of effort (my sql skills are almost no existent) I > have the following that w

Alternative for NOT EXISTS

2002-10-10 Thread Victor Kirk
Hi, I have two tables, one for user details and another to indicate membership of some team. The later has user_id and team_id. I want to select all users that are NOT in a particular team. After a lot of effort (my sql skills are almost no existent) I have the following that works with Oracle