![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi all, I connect o FMP8.5 using the provided ODBC driver. If I run an SQL statement like this... "select * from contacts where firstname like 'Tim'" it will only find "Tim", not "tim" or "TIM" which is wrong. the equals sign can be a binary value compare (therefore case sensitive) but the "like" compare should be a text compare (therefore NOT case sensitive). Whose problem is this? FMP or that datadirect crowd? Who can I moan to? A rediculous work around I use it to create a calc fields that makes the firstname field all uppercase, then make sure the search criteria is also forced to uppercase. But I should have to do it. Any tips? thanks Tim |
#3
| |||
| |||
|
|
Try: select * from contacts where firstname like '%Tim' Note the single quotes (technically an apastrophe) instead of the double quotes around the literal, and the percentage sign in front of it. I had success testing with: SELECT s_First, s_Last, n_SNName FROM NamesForODBC where s_First like '%Rae' Where I have two records with the same string, 'Rae', in NamesForODBC, the above query returns both if they both use an upper-case 'R' and only the one if I lower the case of one to 'r'. In general, I've found the syntax to often be unexpected and fussy, and hardly the 1992 ANSI standard. I believe, but do not know for certain, that the driver vendor is at fault. There is another driver from Actual Technologies (?), which I have never tried but about which I have heard good anecdotal results. -- John Weinshel Datagrace Vashon Island, WA (206) 463-1634 Certified For Filemaker 8 Certified For Filemaker 7 Citizen10Bears (AT) gmail (DOT) com> wrote in message news:1162642323.718151.231330 (AT) b28g2000cwb (DOT) googlegroups.com... hi all, I connect o FMP8.5 using the provided ODBC driver. If I run an SQL statement like this... "select * from contacts where firstname like 'Tim'" it will only find "Tim", not "tim" or "TIM" which is wrong. the equals sign can be a binary value compare (therefore case sensitive) but the "like" compare should be a text compare (therefore NOT case sensitive). Whose problem is this? FMP or that datadirect crowd? Who can I moan to? A rediculous work around I use it to create a calc fields that makes the firstname field all uppercase, then make sure the search criteria is also forced to uppercase. But I should have to do it. Any tips? thanks Tim |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Try this SELECT * FROM WHERE LOWER(fieldname) LIKE LOWER('Tim') |
#6
| |||
| |||
|
|
hi all, I connect o FMP8.5 using the provided ODBC driver. If I run an SQL statement like this... "select * from contacts where firstname like 'Tim'" it will only find "Tim", not "tim" or "TIM" which is wrong. the equals sign can be a binary value compare (therefore case sensitive) but the "like" compare should be a text compare (therefore NOT case sensitive). Whose problem is this? FMP or that datadirect crowd? Who can I moan to? A rediculous work around I use it to create a calc fields that makes the firstname field all uppercase, then make sure the search criteria is also forced to uppercase. But I should have to do it. |
![]() |
| Thread Tools | |
| Display Modes | |
| |