Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.1.137
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Cobol 5.0.137
  HXTT DBF 7.1.138
  HXTT Excel 6.1.141
  HXTT Json 1.0.109
  HXTT Paradox 7.1.137
  HXTT PDF 2.0.137
  HXTT Text(CSV) 7.1.137
  HXTT Word 1.1.137
  HXTT XML 4.0.138
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)

HXTT ACCESS
Case-insensitive string comparisson
Magnus Meurer
2008-08-11 00:45:11.0
Hi,

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 = 'Test@test.com'

This statement should find values like this
test@test.com
Test@test.com
test@Test.com
Test@TEST.Com
.
.
.

Regards,
Magnus

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 'Test@test.com'

3rd.SELECT * FROM tbl_user WHERE upper(email) = upper('Test@test.com')

4th.SELECT * FROM tbl_user WHERE lower(email) = lower('Test@test.com')

Search Key   Search by Last 50 Questions




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Sitemap