MySQL Forums
Forum List  »  Newbie

Re: Insert into concat("table", "name")
Posted by: Peter Brawley
Date: July 24, 2017 10:15AM

> Im trying to write an event where I dont know the name of the table in advance

> INSERT INTO CONCAT("tableName", YEAR(CURDATE())) (f1, f2)

Concat() works on SQL data, not on SQL identifiers.

You could try hiding the abstraction in a stored procedure, and have the Event call the sproc.

Options: ReplyQuote


Subject
Written By
Posted
Re: Insert into concat("table", "name")
July 24, 2017 10:15AM


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.