When using SQL, the IN statement does not work in the SELECT section of a query

ES Version: 7.8

I’m trying to run the following in SQL Workbench, and one query works, but the other one does not…any thoughts?

Successful:

SELECT
  *
FROM
  my_index
WHERE
  a.b IN ('115')

Failure:

SELECT
  a.b IN ('115') AS 'FOO'
FROM
  my_index

What is that syntax?
What are you trying to achieve?

This simply is an invalid syntax. See Elastic's supported syntax or any other SQL tutorials.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.