Harshal Borse
Harshal Borse

Reputation: 99

Cassandra query getting error

Friends I am getting this error when executing the following query : syntax error near unexpected token `(' Help me...

 INSERT INTO table_name(account_sid, transcription_id, audio_url, call_sid, callback_method, callback_url, cost, duration, recording_sid, status, transcription_change_date, transcription_date, transcription_sid, transcription_text, type) VALUES ('534534534534535', now(), '', '', '', '','', '', '', '', '', '', '', '', '');

Upvotes: 1

Views: 429

Answers (1)

undefined_variable
undefined_variable

Reputation: 6228

Type is a keyword in CQL, hence it is failing. You can use double quotes to escape.

 INSERT INTO table_name(account_sid, transcription_id, audio_url, call_sid, callback_method, callback_url, cost, duration, recording_sid, status, transcription_change_date, transcription_date, transcription_sid, transcription_text, "type") VALUES ('534534534534535', now(), '', '', '', '','', '', '', '', '', '', '', '', '');

List of keywords in CQL

Upvotes: 2

Related Questions