Subject | How to use a reduced/restricted collation? |
---|---|
Author | phil_hhn |
Post date | 2008-07-15T12:03:30Z |
Hi, some time ago I raised some questions in the thread "How to
'upper' characters with accents?" - I got some great info, thanks.
What I want to do now is remove (or ignore) all punctuation from
varchar data already in the database. For example, change "sally's" to
"sallys".
AFAIK there is no replace (yet) in FB? And even if there was it may be
a big task to handle all the different punctuation characters that can
occur. Then I had an idea - can this be done by applying a reduced
collation or charset to a field? I.e for example a collation that only
accepts A-Z, a-z, which would force all punctuation to be omitted.
What I want to do is search a field, ignoring punctuation, so we could
do things like
"... WHERE LASTNAME COLLATE EN_UK = :lastnametosearch ..."
and then find O'Donnell, even if someone only searched for ODonnell.
Is this possible, or any ideas?
Thanks, Phil
'upper' characters with accents?" - I got some great info, thanks.
What I want to do now is remove (or ignore) all punctuation from
varchar data already in the database. For example, change "sally's" to
"sallys".
AFAIK there is no replace (yet) in FB? And even if there was it may be
a big task to handle all the different punctuation characters that can
occur. Then I had an idea - can this be done by applying a reduced
collation or charset to a field? I.e for example a collation that only
accepts A-Z, a-z, which would force all punctuation to be omitted.
What I want to do is search a field, ignoring punctuation, so we could
do things like
"... WHERE LASTNAME COLLATE EN_UK = :lastnametosearch ..."
and then find O'Donnell, even if someone only searched for ODonnell.
Is this possible, or any ideas?
Thanks, Phil