Re: [SQL] SQL Syntax / Logic question

2001-10-08 Thread Thurstan R. McDougle
To help you understand SQL I should point out that your version would work (assuming only 1 school per person) if you just left the friends out of the FROMs for the sub-selects:- select frienda, friendb from friends where (select schools.school from schools as schoolsa where friends.frienda = sc

Re: [SQL] SQL Syntax / Logic question

2001-10-04 Thread Josh Berkus
Mike, > select frienda, friendb from friends where (select > schools.school from friends,schools where friends.frienda = > schools.person) = (select schools.school from friends,schools where > friends.friendb = schools.person); Too complicated. You need to learn how to use JOINS and table alias

[SQL] SQL Syntax / Logic question

2001-10-04 Thread Michael D. Harlan
I've been working on this SQL problem for about 12 days now and have asked for help from friends/colleagues, but haven't found a solution. I send it to this list as a last resort. Let's say I have a table called "friends" and in this table, I have the following data: FriendA FriendB --- -