|
Posted by Jack Vamvas on 01/31/08 10:46
Look at GROUP BY
--
Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com
"SirCodesALot" <sjourdan@gmail.com> wrote in message
news:20a0a9bd-c8b1-4437-a601-40f1280ee966@u10g2000prn.googlegroups.com...
>I need some help, i need to join 4 tables but get a huge number of
> results, so I must be doing something wrong.
>
> here are my tables
>
> WebGroups
> - WebId
> -Title (values: "Admin" or "NonAdmin")
>
> WebGroupMembers
> - WebId
> - MemberId
>
> Webs
> - WebId
> - Title
>
> UserInfo
> -MemberId
> -Title
>
> I want to return the Distinct UserInfo.Title, Webs.Title,
> WebGroups.Title where WebGroups.Title="Admin"
>
> So here is what I thought should work
>
> Select Disctinct UserInfo.Title, Webs.Title, WebGroups.Title from
> Userinfo
> INNER JOIN WebGruopMembers
> ON UserInfo.MemberID = WebGroupMember.MemberID
> INNER JOIN WebGroups
> ON Webgroups.WebId = WebGroupMember.WebID
> INNER JOIN Webs
> ON WebGroups.WebId = WebGroups.WebID
> WHERE WebGroups.Title = "Admin"
>
> Any ideas?
Navigation:
[Reply to this message]
|