Reputation: 2283
I'm getting an error with my Insert query in cassandra "ERROR: line 5:75 mismatched input '-02' expecting ')' (log_sid)"
My Query is:
INSERT INTO table_name(account_sid, datetime_uuid, log_add_name, log_detail, log_post_back, log_post_front, log_price, log_request_type, log_sid) VALUES ('YTe9e7d2f82f2d88db31cfcafd9f4a7a2d', 2016-02-12 11:45:37, 'Birthday gft','{"Postcard_message":"","Postcard_size":"1001","Postcard_data":""}', 'pdf file google storage path1', 'pdf file google storage path2', 0.8750,'postcard', 'psc_5823b1cb9445335d');
Upvotes: 3
Views: 367
Reputation: 337
It seems like for log_detail you are using map and passing values in quotes'' which is incorrect.
Use something like below:
INSERT INTO post_log(account_sid, datetime_uuid, log_add_name, log_detail, log_post_back,
log_post_front, log_price, log_request_type, log_sid)
VALUES ('YTe9e7d2f82f2d88db31cfcafd9f4a7a2d', '2016-02-12 11:45:37','Birthday gft',
{"Postcard_message":"","Postcard_size":"1001","Postcard_data":""},
'https://storage.googleapis.com/m360103069/directmail/postcard/psc_5823b1cb9445335d_back.pdf',
'https://storage.googleapis.com/m360-103069/directmail/postcard/psc_5823b1cb9445335d_front.pdf',
'0.8750','postcard', 'psc_5823b1cb9445335d');
Upvotes: 5
Reputation: 576
Check this code may be help you
INSERT INTO post_log(account_sid, datetime_uuid, log_add_name, log_detail, log_post_back, log_post_front, log_price, log_request_type, log_sid)
VALUES ('YTe9e7d2f82f2d88db31cfcafd9f4a7a2d', '2016-02-12 11:45:37','Birthday gft','{"Postcard_message":"","Postcard_size":"1001","Postcard_data":""}','https://storage.googleapis.com/m360103069/directmail/postcard/psc_5823b1cb9445335d_back.pdf', 'https://storage.googleapis.com/m360-103069/directmail/postcard/psc_5823b1cb9445335d_front.pdf','0.8750','postcard', 'psc_5823b1cb9445335d');
Upvotes: 0