Re: case insensitive selects



Radomir Hejl wrote:

Hello,
does DBD::CSV supports the following select clause?

select * from table where upper (col1) like '%ab%';


Yes that syntax is supported, although, I think you might want LOWER (col1) instead of UPPER since the example you show will never find any matches. Also, BTW, SQL::Statement's CLIKE operator is a case-insensitive version of LIKE so you can use it also, though the method you show is more portable.

I'd like to make case insensitive queries but from docs it seems
it's not allowed.

Could you let me know where you found that in the docs, I'll change it. Also, please make sure that you have the latest version of SQL::Statement since all of DBD::CSV's SQL comes from that module and that's the module that contains the docs on what SQL is supported.

--
Jeff
.



Relevant Pages

  • Re: Function based index not used with like operator
    ... search for is starting with the characters the user search for. ... SQL> set echo on linesize 132 trimspool on ... col2 from uppertest1 where upper ... 438 bytes received via SQL*Net from client ...
    (comp.databases.oracle.server)
  • Re: XML vs SQL Server
    ... The built in factory assumes a common syntax among the ... the DBProvider Factory pattern is an interface-based ... Even if your SQL needs to be changed, ... change the value of the CommandText and everything else is fine. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Connection.Execute causes untrappable runtime error
    ... Set Recordset = Database.Execute ... If I want to do a delete or Update, I do a Database.Execute ("SQL Syntax") ... I believe that the dataenvironment is the best thing in vb6 (The program are ...
    (microsoft.public.vb.database.ado)
  • Re: Difference in Left Join, Right Join
    ... RIGHT syntax exist. ... If you write SQL such that what you feel is the driving table is at ... The above is Oracle outer join syntax, ...
    (comp.databases.oracle.misc)
  • Re: Linq to Python
    ... paradigm's big idea is to use a python + SQL type syntax to access data ... Simple LINQ expressions like the one you gave map easily to Python list ... I'm not overly keen on SQL syntax: I think this sort of complex expression ...
    (comp.lang.python)