0

while making query to Riak TS, my email contaning @ symbol so it giving some problem like

SQL Lexer error <<"Unexpected token '@'.">>

then How we Resolve this problem.

  • show your code first – Saranjith Jun 14 '17 at 04:06
  • while querying from riak-shell simply its returning this error, and my query is select SUM(steps),registrationDate from steps where start >= 1482085800000 and start <= 1489775400000 and userName = 'hussain.shahzad250@gmail.com'; – Shahzad Hussain Jun 14 '17 at 04:15

2 Answers2

0

Use below query.

SELECT SUM(steps),
       registrationDate
FROM steps
WHERE
  START >= 1482085800000
  AND
  START <= 1489775400000
  AND userName = <<"hussain.shahzad250@gmail.com">>;
Saranjith
  • 11,242
  • 5
  • 69
  • 122
  • Sorry , it still having problem as SQL Parser error {<<"<">>,riak_ql_parser, ["syntax error before: ","less_than_operator"]} – Shahzad Hussain Jun 14 '17 at 07:59
  • Yes i got response but, Now query will be like as select start,end,steps from steps_record where start >= 1472495400000 and start <= 1490121000000 and userName = '<<"hussain.shahzad250@gmail.com">>'; – Shahzad Hussain Jun 14 '17 at 08:07
  • i am getting response but all time its returning No rows returned. why ?? achually data is in my Riak TS DB. – Shahzad Hussain Jun 14 '17 at 08:13
0

specially @Saranjith

Query will be now as given below

select start,end,steps from steps_record where start >= 1472495400000 and start <= 1490121000000  and userName = '<<"apolloprod120@gmail.com">>';

anyways Thanks @Saranjith, i tried with your given syntax in 2-3 ways after that i got this solved.