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
 Transact-SQL (2000)
 non ascill characters + text field

Author  Topic 

dupati1
Posting Yak Master

123 Posts

Posted - 2005-11-02 : 13:11:44
Guys,

I have a table with a text field called ResumeText

Lets say simplified table looks like below...

EmpID | ResumeText
__________________
1 | blahblahblah
2 |sdklfjndsfds

what i am trying to do is to find only those records that have a non ascii characters in the ResumeText...

for example...

SELECT EmpID, ResumeText FROM mytable
WHERE PATINDEX('% %',ResumeText)>0

gives me all the records that contain a single space...

how to i write something similar for the filtering all the records that containing nonascii character...do i need to write multiple Patindexes to cover all the nonascii characters...

Any Suggestions

nr
SQLTeam MVY

12543 Posts

Posted - 2005-11-02 : 13:14:51
Something like
http://www.mindsdoor.net/SQLTsql/FindNonAlphaCharacters.html
so
patindex('%[^a-zA-Z0-9 ]%',fld) <> 0
i.e. everything with a char not in a-zA-Z0-9

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

dupati1
Posting Yak Master

123 Posts

Posted - 2005-11-02 : 13:27:30
yep..thats exactly what i was looking for...

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-04 : 05:21:19
Refer this also
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=56713

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -