Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  Buy Now
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
  HXTT Word v1.1
  HXTT XML v4.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 Xi'an 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 © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap