You can't have a table name with the %
character, check this reference
Permitted characters in unquoted identifiers:
ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)
Question
i have problem
CREATE TABLE acct_v4_%Y_%m_%d (
ip_src CHAR(15) NOT NULL,
ip_dst CHAR(15) NOT NULL,
src_port INT(2) UNSIGNED NOT NULL,
dst_port INT(2) UNSIGNED NOT NULL,
ip_proto CHAR(6) NOT NULL,
packets INT UNSIGNED NOT NULL,
bytes BIGINT UNSIGNED NOT NULL,
stamp_inserted DATETIME NOT NULL,
stamp_updated DATETIME,
PRIMARY KEY (ip_src, ip_dst, src_port, dst_port,
ip_proto, stamp_inserted)
);
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 ''%Y''%m''%d' ( ip_src CHAR(15) NOT NULL, ip_dst CHAR(15) NOT ' at line 1
Why does this error come about?
Solution
You can't have a table name with the %
character, check this reference
Permitted characters in unquoted identifiers:
ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore)