UPDATE...WHERE ... IN (SELECT...)

2004-06-09 Thread Markus Källander
Hi all,
 
Can someone tell me what is wrong with this statement? 
 
UPDATE nummer SET gold = '1' WHERE anr IN (SELECT no FROM gull);
 
I use MySQL 3.23.49.
 
Thanks
Markus Källander


RE: UPDATE...WHERE ... IN (SELECT...)

2004-06-09 Thread Victor Pendleton
Sub-select not supported in version you are using. 

-Original Message-
From: Markus Källander
To: [EMAIL PROTECTED]
Sent: 6/9/04 11:25 AM
Subject: UPDATE...WHERE ... IN (SELECT...)

Hi all,
 
Can someone tell me what is wrong with this statement? 
 
UPDATE nummer SET gold = '1' WHERE anr IN (SELECT no FROM gull);
 
I use MySQL 3.23.49.
 
Thanks
Markus Källander

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: UPDATE...WHERE ... IN (SELECT...)

2004-06-09 Thread Young, Michael
 -Original Message-
 From: Markus Källander 
 [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 09, 2004 10:25 AM
 To: [EMAIL PROTECTED]
 Subject: UPDATE...WHERE ... IN (SELECT...)
 
 
 Hi all,
  
 Can someone tell me what is wrong with this statement? 
  
 UPDATE nummer SET gold = '1' WHERE anr IN (SELECT no FROM gull);
  
 I use MySQL 3.23.49.
  
 Thanks
 Markus Källander
 

Sub-queries aren't supported in your version of MySQL. I believe you must have version 
= 4.1 for that to work.

--
Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: UPDATE...WHERE ... IN (SELECT...)

2004-06-09 Thread Josh Trutwin
On Wed, 9 Jun 2004 18:25:11 +0200
Markus Källander [EMAIL PROTECTED] wrote:

 Hi all,
  
 Can someone tell me what is wrong with this statement? 
  
 UPDATE nummer SET gold = '1' WHERE anr IN (SELECT no FROM gull);
  
 I use MySQL 3.23.49.
  ^^^

4.1 or higher is required for sub-selects. 
http://dev.mysql.com/doc/mysql/en/Subqueries.html

Josh

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: UPDATE...WHERE ... IN (SELECT...)

2004-06-09 Thread Laercio Xisto Braga Cavalcanti
Hi Markus,

You cannot use sub-query in mysql 3.23.49

Regards,

Laercio Cavalcanti. 

-Original Message-
From: Markus Källander [mailto:[EMAIL PROTECTED] 
Sent: quarta-feira, 9 de junho de 2004 13:25
To: [EMAIL PROTECTED]
Subject: UPDATE...WHERE ... IN (SELECT...)

Hi all,
 
Can someone tell me what is wrong with this statement? 
 
UPDATE nummer SET gold = '1' WHERE anr IN (SELECT no FROM gull);
 
I use MySQL 3.23.49.
 
Thanks
Markus Källander


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]