Saturday, 15 March 2014

crosstab - Cross table update query in MySql -


I can execute this type of query in SQL Server:

  update tblmembers set Hits_archived = (Select the count (*) from Tblhits where tblhits.target_id = tblmembers.id and tblhits.hitdate & lt; '2009-11-01') where tblmembers.regdate & lt; '2007-09-28'  

How can I do this in MySql 4.0.23? I tried to execute the query, but returned this error message:

There is an error in your SQL syntax with Tblhits near the 'select count (*) to use the correct syntax for your Check the MySQL server version related manual, where tblhits.target_id = tblmem

using MySQL A subquery can also be done with.


No comments:

Post a Comment