Saw this on the perl-win32-database mailing list.

Joe, is SQL::Statement case sensitive for LIKE operations?

Looks like sets and ranges aren't available either:

LIKE '[Ss]ilicon'

Am I mistaken, if not then perhaps there should be a note in the docs (I guess
there already is but I can't find it.

--
  Simon Oliver

-------- Original Message --------
Subject: CSV SQL Statements
Date: Sun, 6 Jan 2002 19:27:36 -0500
From: "Christopher J. Crane" <[EMAIL PROTECTED]>
Reply-To: "Christopher J. Crane" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>

I use CSV files and the CSV DBD a lot in websites using databases. It's easy
and portable. One problem I am having though is when I use the LIKE
statements such as

"SELECT * FROM database WHERE ProductDescriptions ='%$form{'SearchFor'}%'"

*/ I'm sure he means 'LIKE' not '=' here /*

The problem is if the word "Silicon" is in the ProductDescriptions fields
and the $form{'SearchFor'} = "silicon", it will not find it. It is case
sensitive. If I had $form{'SearchFor'} = "Silicon", it would return it no
problem.

Is there an easy way to get around the case sensitive issue. Since the
database is nothing more than a text csv file, I am sure I could use some
other form a perl search routine if someone has one. I would just push like
the first field the product ID into an array for later searching in the
database or something.

Any help would be greatly appreciated.

!-->





_______________________________________________
Perl-Win32-Database mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-database

Reply via email to