0

I'm trying queries with ANY(), SOME() and ALL(), as per https://docs.aws.amazon.com/timestream/latest/developerguide/comparison-functions.all-any-some.html

along the lines of

SELECT * FROM "mytable"."temperature" WHERE device_name <> ANY('Foo', 'Bar')

and I'm always getting this error:

Problems with function : ANY. Either the function does not exist, or there is a problem with a dependent function

dwery
  • 1,128
  • 10
  • 20

1 Answers1

0

As per https://forums.aws.amazon.com/thread.jspa?messageID=964438&#964438

The keyword VALUES should be used if the comparison values is a list of literals e.g. SELECT * FROM "mytable"."temperature" WHERE device_name ANY(VALUES 'Foo', 'Bar'). Same for ALL and SOME too. The alternative syntax is SELECT * FROM "mytable"."temperature" WHERE device_name ANY (SELECT 'Foo' UNION ALL SELECT 'Bar')

dwery
  • 1,128
  • 10
  • 20