MySQL Forums
Forum List  »  Newbie

Insert into concat("table", "name")
Posted by: John Noble
Date: July 24, 2017 03:46AM

Hi there,

Im trying to write an event where I dont know the name of the table in advance but it will be something like tableName2017 where 2017 is the current year.

I have tried:

INSERT INTO CONCAT("tableName", YEAR(CURDATE())) (f1, f2)
SELECT f1, f2 FROM table2;

without success. If I remove the CONCAT syntax and hardcode the tablename then it works fine.

Any ideas ??

J

Options: ReplyQuote


Subject
Written By
Posted
Insert into concat("table", "name")
July 24, 2017 03:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.