Replace all fields in MySQL

Use the following SQL query to generate the SQL queries that you need to replace a value in all columns. select concat( ‘UPDATE my_table SET ‘, column_name, ‘ = REPLACE(‘, column_name, ‘, ”a”, ”e”);’) from information_schema.columns where table_name=”my_table”; After executing this SQL query simply run all queries to replace all values. Untested after some googling … Read more

Use SELECT inside an UPDATE query

Well, it looks like Access can’t do aggregates in UPDATE queries. But it can do aggregates in SELECT queries. So create a query with a definition like: SELECT func_id, min(tax_code) as MinOfTax_Code FROM Functions INNER JOIN Tax ON (Functions.Func_Year = Tax.Tax_Year) AND (Functions.Func_Pure <= Tax.Tax_ToPrice) GROUP BY Func_Id And save it as YourQuery. Now we … Read more