[QGIS-trac] Re: [Quantum GIS] #2007: Query builders LIKE statement treats every string like '%string%' with DBF backend

Quantum GIS qgis at qgis.org
Wed Oct 14 05:17:47 EDT 2009


#2007: Query builders LIKE statement treats every string like '%string%' with DBF
backend
-----------------------------------------------------+----------------------
        Reporter:  marisn                            |         Owner:  nobody
            Type:  bug                               |        Status:  new   
        Priority:  major: does not work as expected  |     Milestone:        
       Component:  Vectors                           |       Version:  HEAD  
      Resolution:                                    |      Keywords:  SQL   
Platform_version:                                    |      Platform:  Gentoo
        Must_fix:  No                                |   Status_info:  1     
-----------------------------------------------------+----------------------
Comment (by marisn):

 Good news - it's NOT an GDAL/OGR bug but a QGIS bug :) Tested with 1.6.2
 ogrinfo -where and -sql options - OGR returns correct results. QGIS 1.2.0
 and current trunk - NOT correct results. I will attach sample dataset.

 Steps to reproduce:
  * Open file (UTF-8 coding);
  * Open Attribute table;
  * Advanced search;
  * At SQL where clause enter following text:
 {{{
 NOSAUKUMS LIKE 'S%'
 }}}
  * Press OK.
 I get 4 results - also "CESIS", still "CESIS" doesn't match 'S%' pattern.

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/2007#comment:3>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list