[Gvsig_english] Sql language in the shapefile filter

Marcus C. England marcuscengland at gmail.com
Wed May 21 04:55:53 CEST 2008


More investigation... the following works:

where fips = '6037'

and the following also works:

where fips = 6037

but, for the county attribute, the following returns no error codes but 
nothing shows up on the screen:

where county = 'Los Angeles County'

I tried other counties with the same result.

The following returns errors related to spaces:

where county = Los Angeles County

I would love it if someone could explain to me why the sql where clause 
on the county column won't work. It has to be something in the sql 
interface of gvSIG, because it works on the same layer in OpenJump and qGIS.

Thanks,

Marcus




Francisco José Peñarrubia wrote:
> Hi.
>
> If you mean sql where clause when you open a Postgis layer, the 
> sentence should be "Postgress compliant". I don't know if you can use 
> county = 'Los Angeles County' but I think you can try county like 'Los 
> Angeles County'.
>
> Hope this helps.
>
> Cheers.
>
> Fran.
>
> Marcus C. England escribió:
>> Hi,
>>
>> I have a similar question... I can not get sql restriction to work. 
>> For example, I have a postgis database layer called 
>> "california_counties". This layer has an attribute column called 
>> "county" with the county names. In other programs I can load Los 
>> Angeles County only by using the sql statement:
>>
>> county = 'Los Angeles County'
>>
>> This does not work in gvSIG however. I always get a box that says:
>>
>> "syntax error at or near "=""
>>
>> I can't figure out what the problem is and I am hoping someone can help.
>>
>> -Marcus
>>
>>
>> silvio grosso wrote:
>>> Hello everybody,
>>> I am wondering if is it possible to write some simple query in the 
>>> filter using the SQL language?
>>>
>>> I read gvSIG's manual but I didn't find any example about that.
>>> At present , to select an area I should write: TOPONIMO = 'ASTI' in 
>>> order to get the selection.
>>> Nevertheless, in some cases SQL language is faster.
>>> For example, when I want to select  two areas in a shapefileI am 
>>> obliged to write two times the word TOPONIMO (e.g TOPONIMO = 'ASTI' 
>>> or TOPONIMO =  'Aglie'). When I want to select four or more 
>>> TOPONIMOS in the filter it becomes complicated.
>>>
>>> Best regards
>>>
>>> Silvio
>>>
>>>
>>>       ___________________________________ Scopri il Blog di Yahoo! 
>>> Mail: trucchi, novità, consigli... e la tua opinione!
>>> http://www.ymailblogit.com/blog/
>>>
>>> _______________________________________________
>>> Gvsig_internacional mailing list
>>> Gvsig_internacional at runas.cap.gva.es
>>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>>>
>>>   
>>
>> _______________________________________________
>> Gvsig_internacional mailing list
>> Gvsig_internacional at runas.cap.gva.es
>> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at runas.cap.gva.es
> http://runas.cap.gva.es/mailman/listinfo/gvsig_internacional
>



More information about the Gvsig_internacional mailing list