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)
 Creating function for removing special characters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-10-24 : 09:45:18
Sweeti writes "Could you please tell me how to create function for removing special characters specially for name string.

A user defined function in MS SQL server will take a Name String as an input
All special character in the Name string has to be removed

For eg. Miss. Sweeti Reddy is the name string. and special character fullstop(.) should be removed and only full name 'Sweeti Reddy' has to be removed.

Hope you could give me the solution as earliest as possible."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-10-24 : 09:54:06
You should filter the data from Fron End and send only VALID data to SQL Server table.
Otherwise you need ot make use of Replace function like this

replace(string,'.','')


Madhivanan

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

- Advertisement -