How to filter out features with WHERE clause

193
3
Jump to solution
11-17-2021 11:27 AM
REDARiahi
New Contributor

I'm trying to filter out features with Departamento = '01 - País' using the WHERE clause, using "!=", but it returns "Invalid Syntax". Here is the REST API url and this is the WHERE clause statement I'm using: 

WHERE = FECHA>=CURRENT_TIMESTAMP - INTERVAL '10' DAY 
AND Departamento != '01 - País'

 The syntax is valid with "=", but not with "!=". 

Thanks for the help!

0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Honored Contributor

"Not equals" should be "<>".

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
3 Replies
jcarlson
MVP Honored Contributor

"Not equals" should be "<>".

- Josh Carlson
Kendall County GIS
0 Kudos
REDARiahi
New Contributor

Thanks Josh, didn't think about that one! I was mislead by the documentation stating that "!=" was an accepted syntax. I'm I understanding it wrong?

0 Kudos
jcarlson
MVP Honored Contributor

I'd bet it's this sentence here:

Some data sources have restrictions on what is supported.

That's in reference to which SQL-92 commands are acceptable in the where parameter. I'd take a closer look at the data source you're querying and what kind of database it's running on, as that may be what's causing the issue.

- Josh Carlson
Kendall County GIS