SQL Server Forums
Profile | Register | 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
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

phrankbooth
Posting Yak Master

USA
160 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
337 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
Constraint Violating Yak Guru

USA
411 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  
 New 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.06 seconds. Powered By: Snitz Forums 2000