simple subquery syntax not working!

2004-12-22 Thread Renee Henderson
I have read through quite a bit of the MySQL manual concerning subqueries and cannot seem to get even the simplist of queries to work! I have a table called PersonRole which is the many-to-many joint table between two upper tables, Person and Role. I have tested the two pieces of the query

Re: simple subquery syntax not working!

2004-12-22 Thread Homam S.A.
Make sure the subquery returns a scalar value. Either the roleDBNum column has to be unique or you need to apply an aggregate function to reduce to a single value. If the the subquery returns many values, use the IN operator instead of =. Disclaimier: I'm still new to MySQL, but I'm assuming it

RE: simple subquery syntax not working!

2004-12-22 Thread Harish
Hi Renee, Check the version of your MySQL. The subqueries feature is available from MySQL 4.1 Hope this helps you. - Harish -Original Message- From: Renee Henderson [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 6:17 AM To: mysql@lists.mysql.com Subject: simple subquery

Question - SubQuery syntax

2004-12-21 Thread Jan Peta
Hello, I have problem with this syntax: SELECT game_id FROM game WHERE game_id NOT IN (SELECT game_id FROM player WHERE user_id!=$id_user) I need select games where user is not connected. I have two tables game(game_id, ) and player(player_id, game_id, user_id, ...). In table player are

Re: Question - SubQuery syntax

2004-12-21 Thread Jigal van Hemert
I have problem with this syntax: SELECT game_id FROM game WHERE game_id NOT IN (SELECT game_id FROM player WHERE user_id!=$id_user) I need select games where user is not connected. I have two tables game(game_id, ) and player(player_id, game_id, user_id, ...). In table player are many

subquery syntax

2002-07-30 Thread davidarice
Hello: I am new to this and am having trouble with subqueries. Using MySQL 3.23 I have a Contacts table, and a Users table each with a ContactId field. I want to retrieve the ContactID from the Users table where UserName and UserPassword are such and such, I then want to get the FirstName

Re: subquery syntax

2002-07-30 Thread Jeff Dyer
] To: [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 3:55 PM Subject: subquery syntax Hello: I am new to this and am having trouble with subqueries. Using MySQL 3.23 I have a Contacts table, and a Users table each with a ContactId field. I want to retrieve the ContactID from the Users table where

RE: subquery syntax

2002-07-30 Thread Salada, Duncan
AM To: [EMAIL PROTECTED] Subject: subquery syntax Hello: I am new to this and am having trouble with subqueries. Using MySQL 3.23 I have a Contacts table, and a Users table each with a ContactId field. I want to retrieve the ContactID from the Users table where UserName and UserPassword

Re: subquery syntax

2002-07-30 Thread davidarice
. Argg. Apparently you will have to wait for version 4.1. Subqueries are not supported Jeff - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 3:55 PM Subject: subquery syntax Hello: I am new to this and am having trouble

Re: subquery syntax

2002-07-30 Thread Daniel Brockhaus
Subject: subquery syntax Hello: I am new to this and am having trouble with subqueries. Using MySQL 3.23 I have a Contacts table, and a Users table each with a ContactId field. I want to retrieve the ContactID from the Users table where UserName and UserPassword

Re: subquery syntax

2002-07-30 Thread Jeff Dyer
- Original Message - From: Daniel Brockhaus [EMAIL PROTECTED] To: Jeff Dyer [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 30, 2002 4:43 PM Subject: Re: subquery syntax Wouldn't SELECT Contacts.FirstName, Contacts.LastName FROM Contacts, Users WHERE