Nested query not working in Cassandra
Asked Answered
S

1

12
USE users_tracking;
SELECT user_name FROM visits
where port_name IN 
(SELECT port_name FROM ports where location = 'NY' )//as temp;

It gives an error mismatched input 'SELECT' expecting RULE_T_R_PAREN

Is there any way I can store the inner query in a variable and then use that? I tried using set@varname := query but it does not recognize the set command.

Succedaneum answered 13/12, 2014 at 14:54 Comment(0)
D
14

Nested queries are not allowed in Cassandra CQL. For this kind of complex querying feature you'll need to use Hive or SparkSQL.

Here is a full CQL reference, http://cassandra.apache.org/doc/cql3/CQL.html

Disturbance answered 13/12, 2014 at 15:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.