|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Simple text replacement question
I have a field with first names in it, but when I updated it, I didn't notice commas in the field. I'd like to be able to delete the commas only in the field, but I can't figure out how. Thanks in advance for the assistance! I'm running MS Sql 7.0
|
|
#2
|
|||
|
|||
|
not really understanding
You want to delete commas, but in the recent update, the commas were not inserted...so you want to delete commas that you're no longer seeing??
Post a screen shot or sample data of what's in the table if you can. |
|
#3
|
|||
|
|||
|
There are commas in the name field that I need to remove.
e.g. "John, K" I just want it to read "John K" |
|
#4
|
|||
|
|||
|
sorry, I don't know how to get rid of just one char in a string. I think you can select the parts you want, then reinsert 'em back into the table, then delete the records that have a "," in it...I'll try to script something like that and try to get back to you.
Btw, this reason is a good reason why I like to have 2 seperate fields, 1 for lastname, another for firstname. From there, inserting a comma is cake if needed, but using 1 field w/a comma already in it and, well...this thread is a result. Just for future reference. In the name field to the right of the comma, is it always a 1 letter initial? Last edited by Username=NULL : May 12th, 2004 at 12:13 PM. |
|
#5
|
|||
|
|||
|
I am using separate fields for first and last names. However, this data comes from a file I'm sent that is generated from a mainframe, so I assume the commas are some sort of separator, but the first name field always has the first name, followed by a comma, and then the middle initial if it exists.
|
|
#6
|
|||
|
|||
|
|
|
#7
|
|||
|
|||
|
Thx Swampboogie
I set up a stored procedure that I call from my access database to do this and it works like a charm!
|
|
#8
|
|||
|
|||
|
thx SB...the info in that link will definitely come in handy sometime.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Simple text replacement question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|