0

Using DBeaver to access a table in Cassandra. I can view the data without any issues, but when I enter my SQL expression to filter results I receive the following error:

SyntaxError: line 1:126 missing EOF at 'LIMIT' (... WHERE language = uk; [LIMIT] 200)

My query: SELECT id, language, content FROM trustyou_reviews WHERE language = uk;

Is it my query?

AST
  • 11
  • 1
  • 9

1 Answers1

1

Always enclose string value with single quote.

SELECT id, language, content FROM trustyou_reviews WHERE language = 'uk';

I check DBeaver's SQL expression filter box, It received only the where clause portion to filter your data but you are give the full query.You should give only the where clause portion. i.e

language = 'uk'
Ashraful Islam
  • 12,470
  • 3
  • 32
  • 53
  • Recieved a new error, which im guessing is caused due to how Cassandra stores data - Partitioning column 'language' cannot be restricted because the preceding column is either not restricted or is restricted by non-EQ relation. – AST Apr 22 '17 at 13:32
  • @AnthonyS In Cassandra there many restriction on how you query. Check this https://www.datastax.com/dev/blog/a-deep-look-to-the-cql-where-clause – Ashraful Islam Apr 22 '17 at 13:36