Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  Buy Now
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

Case-insensitive string comparisson
Magnus Meurer
2008-08-11 00:45:11.0

is there any way to realize a case-insensitive String comparisson in the WHERE condition of a SELECT-statement?

Since the function StrComp is not available in the HXTT driver, how do I realize something like this:

SELECT * FROM tbl_user WHERE email = ''

This statement should find values like this


Re:Case-insensitive string comparisson
HXTT Support
2008-08-11 01:09:11.0
STRCMP(expr1,expr2): returns 0 if the strings are the same, -1 if the first argument is smaller than the second, and 1 otherwise. But it's not case insenstive.

1st. solution:
You can use ODBCCaseInsensitiveBehavior=true connection property.
ODBCCaseInsensitiveBehavior Indicates whether works like MS Access ODBC driver to be case insensitve for string comparison. You can use null, true, false Default: false

2nd. SELECT * FROM tbl_user WHERE email ilike ''

3rd.SELECT * FROM tbl_user WHERE upper(email) = upper('')

4th.SELECT * FROM tbl_user WHERE lower(email) = lower('')

Search Key   Search by Last 50 Questions


Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap