Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Excluding Certaing Characters From A Field in SQL Search Query

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-12-17 : 09:06:28
SJ writes "Greetings;
Here is the puzzle?
I have text Field filled with arabic Text And Script
Arabic Script:
Arabic uses Script along with its letters, These Script includes
CHR(240),CHR(241),....,CHR(248)
in Arabic The Same Letters Copenation could have different meanings with script...

in search :
I want to search for the letters only ,and Exclding the Script...

I can duplicate the text field with text free of script, but this will double the database size, it Expensive and I want other solutions if possible...

note:
if you didn't get the point pls email me to discus more....


Thanks

SJ"

nr
SQLTeam MVY

12543 Posts

Posted - 2001-12-17 : 23:42:36
You want to exclude CHR(240),CHR(241),....,CHR(248)
from the search?
How are you doing the search

where replace(replace(fld,CHR(240),''),CHR(241),'') like '%sadff%'

or you could replace with a %.

possibly change the searched string using [] between each letter.

If you are using v2000 can use a udf for this.


==========================================
Cursors are useful if you don't know sql.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -