I'm trying to copy a DATETIME field from one table to another using an INSERT statement like this:
[tt]INSERT INTO table2 (value1, date1)
SELECT (value1, date1)
FROM table2;[/tt]
MySQL gives me this error:
[tt]Error 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' date1) FROM table2'[/tt]
Date1 is a DATETIME field in both tables. I'm not trying to insert the current date or a timestamp. Date1 needs to move unchanged.
Thanks,
Rob
[tt]INSERT INTO table2 (value1, date1)
SELECT (value1, date1)
FROM table2;[/tt]
MySQL gives me this error:
[tt]Error 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' date1) FROM table2'[/tt]
Date1 is a DATETIME field in both tables. I'm not trying to insert the current date or a timestamp. Date1 needs to move unchanged.
Thanks,
Rob