我试图在我的 Cassandra 表中插入特殊字符,但无法插入。无法在带有变音符号的表中插入数据 https://stackoverflow.com/questions/17425262/inserting-data-in-table-with-umlaut-is-not-possible正如链接中提到的,即使我的字符集是 UTF8,我也尝试了上面的链接。我无法插入。我尝试过使用引号仍然不起作用
CREATE TABLE test.calendar (
race_id int,
race_start_date timestamp,
race_end_date timestamp,
race_name text,
PRIMARY KEY (race_id, race_start_date, race_end_date)
) WITH CLUSTERING ORDER BY (race_start_date ASC, race_end_date ASC
insert into test.calendar (race_id, race_start_date , race_end_date , race_name ) values (501,2016-02-18 05:00:00+0000 ,2016-02-22 05:00:00+0000 ,'Hotel in der Nähe von mir');
ERROR MESSAGE :
SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:99 mismatched input '-02' expecting ')' (...race_name ) values (501,2016[-02]-18...)">
您没有引用您的日期值,所以2016-02-22 05:00:00+0000
被视为“2016 minus 02 minus 22 blah blah blah”——算术运算后跟一些随机数字垃圾。
Try
INSERT .... VALUES(... '2016-02-22 05:00:00+0000', ...)
^------------------------^
反而。请注意'
quotes.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)