On Wednesday 26 May 2010 06:04:28 pm Andrea Aime wrote:
> ID IN ('states.1','states.2') and STATE_NAME like 'I%'
>
> and they all worked fine. Only concern is that ID might conflict with
> an existing field.
Let me open the debate in this list.  

In general, you will have problem in ECQL/CQL if you use an language keyword 
as field identifier. 
By example, if you define a field named LIKE. You will have problem to query by 
the LIKE field.

LIKE > 1 <<< is not a valid sentence.

In SQL, the way to save this problem is to define the identifier between double 
quote. By example

CREATE TABLE test
(
  "LIKE" integer
)
Then you can ask for 
"LIKE" > 1

Actually, there are two different symbols: "LIKE" and LIKE. So, in the SQL 
language "LIKE" is an identifier and    LIKE is the keyword.

So, how could be solved the problem, if someone wants to define an CQL/ECQL 
keyword as property/attribute name in a Layer? 
 
cheers

-- 
Mauricio Pazos
www.axios.es

------------------------------------------------------------------------------

_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to