Go Back   Forum Care Forums > Development Reference Area > MySQL Discussion

Reply
 
LinkBack Thread Tools Display Modes
Please help me with my query ....
Old
  (#1)
Kulgan
Guest
 
Posts: n/a
Default Please help me with my query .... - 06-04-2007, 07:58 AM

Hi all ,

I've got 2 tables : 1)Answers 2) Respondents

Those 2 tables contain 1 common fields 'RecID'.

Now my question is how can I filter the RecIDs from the table Answers who
are not in the table respondents?

Am I clear ?
A little summary: table Answers contains some RecIDs who are not in table
Respondents and I want to view them .

Thanks a lot !!!



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Please help me with my query ....
Old
  (#2)
Captain Paralytic
Guest
 
Posts: n/a
Default Re: Please help me with my query .... - 06-04-2007, 07:58 AM

On 21 May, 08:39, "Kulgan" <nos...@skynet.be> wrote:
> Hi all ,
>
> I've got 2 tables : 1)Answers 2) Respondents
>
> Those 2 tables contain 1 common fields 'RecID'.
>
> Now my question is how can I filter the RecIDs from the table Answers who
> are not in the table respondents?
>
> Am I clear ?
> A little summary: table Answers contains some RecIDs who are not in table
> Respondents and I want to view them .
>
> Thanks a lot !!!


SELECT
`a`.`RecID`
FROM `Answers` `a`
LEFT JOIN `Rrespondents` `r` USING(`RecID`)
WHERE `r`.`RecID` IS NULL

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top