Div
Div

Reputation: 19

Insert Cassandra Query Error

I am writing a simple insert query but getting error.

CREATE TABLE revenue_classification_region (
year int,
region text,
revenue_total int,
PRIMARY KEY (year,region));

INSERT INTO revenue_classification_region (year,region,revenue_total) VALUES (2015,’Western Europe’,5709);

Error:

Invalid syntax at line 1, char 84
  INSERT INTO revenue_classification_region (year,region,revenue_total) VALUES (2015,’Western Europe’,5709);

Please help

Upvotes: 1

Views: 355

Answers (1)

Alex Popescu
Alex Popescu

Reputation: 4002

The text value ('Western Europe') must be enclosed in normal simple quotes: '. Most probably this insert was copied from a web page in which the simple quote was replaced by one of the alternative quote characters.

Upvotes: 3

Related Questions