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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 How to select out only the Unicode chars <> 160
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

phrankbooth
Posting Yak Master

USA
162 Posts

Posted - 08/15/2013 :  15:59:22  Show Profile  Reply with Quote
There's a field that has a string of chars, but one of those chars is Unicode 160 which is bad char.

Without looping, how can I say;

SELECT Field FROM Table WHERE chars in field <> unicode 160

--PhB

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 08/15/2013 :  16:09:28  Show Profile  Reply with Quote
Maybe the REPLACE function?
Go to Top of Page

djj55
Constraint Violating Yak Guru

USA
352 Posts

Posted - 08/16/2013 :  12:47:41  Show Profile  Reply with Quote
have you tried using LIKE?

djj
Go to Top of Page

ScottPletcher
Aged Yak Warrior

USA
550 Posts

Posted - 08/16/2013 :  18:14:03  Show Profile  Reply with Quote
Not 100% sure of what you're trying to do, but maybe this?:


SELECT Field 
FROM Table 
WHERE 
    field LIKE N'%' + NCHAR(160) + N'%'



Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000