Re: Syntax error with a JOIN

2001-12-29 Thread Dobromir Velev
/ -Original Message- From: Keegan Miller <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Saturday, December 29, 2001 08:03 Subject: Syntax error with a JOIN >I'm pulling my hair out about a query that should be simple. I have a >table "member

RE: Syntax error with a JOIN

2001-12-29 Thread Chris Bolt
> Here's the simplified query: > > SELECT members.name, group.id, group.name > FROM members > LEFT JOIN members AS group > ON group.id = members.group_id > WHERE members.id = 6 > > > And here's the error I get: > > You have an error in your SQL syntax near 'group ON group.id = > me

Syntax error with a JOIN

2001-12-28 Thread Keegan Miller
I'm pulling my hair out about a query that should be simple. I have a table "members" with columns id, group_id, and a few more that aren't important here. group_id refers to another row in the same "members" table, but not all members have a group_id. What I want to do is select, for a particu