cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tariq rahiman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5620) Incorrect Syntax for Timestamp in Select query
Date Thu, 06 Jun 2013 18:37:20 GMT
tariq rahiman created CASSANDRA-5620:
----------------------------------------

             Summary: Incorrect Syntax for Timestamp in Select query
                 Key: CASSANDRA-5620
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5620
             Project: Cassandra
          Issue Type: Bug
          Components: Documentation & website
            Reporter: tariq rahiman
            Priority: Minor


In the page http://cassandra.apache.org/doc/cql3/CQL.html under the heading Queries -->
SELECT --> <where-clause>  We have a table posts followed by a Query which doesnt
seem to work against the Cassandra Server. 
Timestamp requires quotes in the WHERE clause.

CREATE TABLE posts (
    userid text,
    blog_title text,
    posted_at timestamp,
    entry_title text,
    content text,
    category int,
    PRIMARY KEY (userid, blog_title, posted_at)
)

Incorrect
SELECT entry_title, content FROM posts WHERE userid='john doe' AND blog_title='John's Blog'
AND posted_at >= 2012-01-01 AND posted_at < 2012-01-31

I get the the error mismatched character '<EOF>' expecting '''

If I correc the error in Johns''Blog and proceed I get missing EOF at '-01'

Correct
SELECT entry_title, content FROM posts WHERE userid='john doe' AND blog_title='John''s Blog'
AND posted_at >= '2012-01-01' AND posted_at < '2012-01-31'

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message