Thread: T-SQL text columns
11-10-05, 23:56 #1Registered User
- Join Date
- Apr 2004
Unanswered: T-SQL text columns
I actually extracted a set of from an email to excel then to a SQL Server table
I'm trying to update a column in a database to clean out everything except the name "George Jeffrey"
bodytext1 column :-
" The following person is leaving the department, please update your records accordingly. Person Leaving: George Jeffrey/Users/DVC Division/Agency: People and Community Advocacy Date Leaving: Thursday 10, November 2005 "
I tried to use the replace method
set bodytext1 = REPLACE(bodytext1,'The following person is leaving the department','')
but this error came out
Server: Msg 8116, Level 16, State 1, Line 1
Argument data type text is invalid for argument 1 of replace function.
Is there another way to do this ?
11-11-05, 07:31 #2Annie's Dog Walker
Provided Answers: 6
- Join Date
- Nov 2004
- on the wrong server
avoid TEXT data types whenever possible. I believe you want to look at at UPDATETEXT in SQL Server Books Online.If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry. Earnest Hemingway, A Farewell To Arms.