Sorry, I'm used to oracle, thought this was a standard query.
> Brian wrote:
> > select s.userid from surveyanswers s where s.userid not in (select
> > distinct u.id from users u)
> >
> >
> > On Tue, 19 Oct 2004 16:30:29 -0600, Jonathan Duncan <[EMAIL PROTECTED]> wrote:
> >
> >>I have a user who
Or without a subquery,
SELECT s.questionid, s.userid FROM SurveyAnswers s LEFT JOIN Users u ON
u.id = s.userid WHERE u.id IS NULL;
Brian wrote:
select s.userid from surveyanswers s where s.userid not in (select
distinct u.id from users u)
On Tue, 19 Oct 2004 16:30:29 -0600, Jonathan Duncan <[EMAI
select s.userid from surveyanswers s where s.userid not in (select
distinct u.id from users u)
On Tue, 19 Oct 2004 16:30:29 -0600, Jonathan Duncan <[EMAIL PROTECTED]> wrote:
> I have a user who is using the following query to try and delete rows
> from one table based on the lack of a user id in
I have a user who is using the following query to try and delete rows
from one table based on the lack of a user id in another table:
SELECT s.questionid, s.userid, s.questionanswer
FROM Users u, SurveyAnswers s
WHERE u.id != s.userid
The corresponding user rows have already be deleted from the t