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
 General SQL Server Forums
 New to SQL Server Programming
 Replacings a dash

Author  Topic 

werhardt
Constraint Violating Yak Guru

270 Posts

Posted - 2008-09-16 : 12:57:29
I have a varchar field that has "/" marks, what would the formula be if I wanted to get rid of those marks?

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-16 : 13:00:06
You can use the REPLACE function.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-16 : 13:00:41
declare @s varchar(30)
set @s = '/sfs/42&(^$/'
print replace(@s,'/','')
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2008-09-16 : 13:15:53
probably with an UPDATE sa well

need more info


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -