Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update with Embedded Select not working

Status
Not open for further replies.

PeterMac

Programmer
Mar 9, 2001
51
0
0
CA
What is wrong with this syntax ? Using MySQL 3.23.51-nt

UPDATE products SET manu_release_date = (SELECT dates.reldate FROM dates, products WHERE dates.id = products.stock_code )

I get the error:

Error MySQL said:

You have an error in your SQL syntax near 'SELECT dates.reldate FROM dates, products WHERE dates.id = products.stock_code )' at line 1

Any help appreciated...
Petermac
 
well it supports insert... select so I just assumed... thanks...

Peter
 
Got this off the MySQL web pages...

Expanded support for subqueries
Subqueries allow you to use the result of one query as a component of a larger query. The MySQL server already supports some forms of this technique, such as INSERT INTO ... SELECT ..., and this support will be expanded in version 4.1 to include nested SELECT queries, which is one of the most-requested features from our users.

4.1 will have to be obtained and tested I guess...

Thanks for the reply
Petermac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top