You are here: how to identify special characters with a single case statement « MsSQL Server « IT news, forums, messages
how to identify special characters with a single case statement

Posted by rshivaraman on 05/08/07 18:10

hi All :

I have an insert statement which reads

INSERT Into TableA (Col1)

SELECT CASE WHEN Col1 LIKE '%[a-z]%' THEN 999999 ELSE Col1 END AS
Col1,
FROM TableB

**********************
TableA. Col1 has a datatype of Int.
TableB. Col1 has a datatype of varchar.

My insert is failing as it is trying to insert special character,
identifying a \ in the input column

How can i write a similar case statement to filter out special
characters and replace with 99999

Also can you refer me to a place where i can have a list of special
characters and if need be write mulitple case statements to filter
them out.

thanks
RS

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация