Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v6.0
  Buy Now
  HXTT Cobol v3.0
  HXTT DBF v6.0
  HXTT Excel v5.0
  HXTT Paradox v6.0
  HXTT Text(CSV) v6.0
  HXTT XML v2.0
Offshore Outsourcing
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
Heng Xing Tian Tai Lab of Beijing 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


Copyright © 1999-2017 Heng Xing Tian Tai Lab of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap