Why this query does not work in mysql :
CREATE TABLE IF NOT EXISTS __temp_orders ( SELECT * FROM orders WHERE STR_TO_DATE(orders.data,'%d.%m.%Y') < '2016-11-01 09:35:00' ) Writes:
[HY000] [1411] Incorrect datetime value: '' for function str_to_date
Although a separate subquery:
SELECT * FROM orders WHERE STR_TO_DATE(orders.data,'%d.%m.%Y') < '2016-11-01 09:35:00' works fine and returns what I want to create a table from.
*, including the use of str_to_date ... - Mike