Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find fist character if its '-' and replace space

Status
Not open for further replies.

kccoolrocks

Programmer
May 14, 2008
6
AU
Hi,

need to find the fist character if its '-' and replace space in the derived column.


thanks,
ab
 
sure - look at the substring, replace, conditional and concatenate function - all of them available on the derived column window so easy for you to play with them until you get the desired result

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
I'd suggest using CHARINDEX to see if the first character is a - and if it is, use REPLACE to change it.

-SQLBill

The following is part of my signature block and is only intended to be informational.
Posting advice: FAQ481-4875
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top