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 2005 Forums
 SSIS and Import/Export (2005)
 Special Characters

Author  Topic 

Brittney10
Posting Yak Master

154 Posts

Posted - 2012-12-10 : 10:05:47
How do i remove all special characters from a column? There's got to be a better way than using Replace for each special character?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2012-12-10 : 10:37:05
Won't front end be able to handle that? You can search for function to remove it and then use it.
Go to Top of Page

Brittney10
Posting Yak Master

154 Posts

Posted - 2012-12-10 : 10:51:54
I need to be able to remove the special characters in the data flow before inserting the record. I'm just trying to determine the most effective way to do this. I can do a replace on the column using a derived data flow transformation, but it seems as though there is a better way to do this...It can be done in a script as well, but my scripting skills are lacking a bit. Basically it comes down to Derived data flow or script task from what I'm reading, but which is the best method to achieve the results I'm wanting?
Go to Top of Page

Brittney10
Posting Yak Master

154 Posts

Posted - 2012-12-10 : 17:21:53
I ended up doing a REPLACE on the characters I needed...the script task would only work by storing an array of characters to remove. Ultimately, a reg. expression will work and is just as efficient as a script task (though the code is not as pretty).
Go to Top of Page
   

- Advertisement -