![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to retain the correct characters in the data. However, I want to be able to use the Western 'a' character in queries, for example: SELECT c.last_name, w.work_name FROM composers c, works w WHERE c.composer_id = w.composer_id AND c.last_name LIKE 'dvorak'; The above query does not return the desired result if I use an English 'a'. I'm working on a web frontend and don't want the user to have to paste in all sorts of characters. Can I create a many-to-one mapping of accented or marked up characters to alphabetic characters? Any other ideas? I'm sure I'm not the first person to think of this... Paul Marquardt |
#3
| |||
| |||
|
|
Snoopy Dogg <snoopy (AT) dogg (DOT) net> wrote [...] I want to retain the correct characters in the data. However, I want to be able to use the Western 'a' character in queries, for example: SELECT c.last_name, w.work_name FROM composers c, works w WHERE c.composer_id = w.composer_id AND c.last_name LIKE 'dvorak'; The above query does not return the desired result if I use an English 'a'. I'm working on a web frontend and don't want the user to have to paste in all sorts of characters. Can I create a many-to-one mapping of accented or marked up characters to alphabetic characters? Any other ideas? I'm sure I'm not the first person to think of this... Use an English collation that treats all different A's as equals. SELECT c.last_name, w.work_name FROM composers c, works w WHERE c.composer_id = w.composer_id AND c.last_name COLLATE some_english_collation LIKE 'dvorak'; Collation names are DBMS specific, don't know about Postgres... Try english_ci_ai (MS SQL Server?) for an English case insensitive, accent insensitive collation. Or try english_1 (Mimer SQL) for a level 1 comparison. (Level 1 is pretty much the same as case and accent insensitive, at least for English.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |