Link to home
Start Free TrialLog in
Avatar of misdevelopers
misdevelopers

asked on

Remove a string in a text field

In a stored procedure, How can I remove a text string in a  text field.

say:
Textfield = 'Something ABCSomething else'

I want to remove the 'ABC' from the text field,

so that when I am done,
Texfield =  'Something Something else'

Thanks in Advance,

Avatar of SQL_SERVER_DBA
SQL_SERVER_DBA
Flag of United States of America image

select replace(columnname, 'string', 'withstrng')
Avatar of misdevelopers
misdevelopers

ASKER

Hello,
Thank you for the suggestion.
When I tried it, I got:
Argument data type text is invalid for argument 1 of replace function.

The field is defined as a data type of text.

 

ASKER CERTIFIED SOLUTION
Avatar of D B
D B
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial