Hi Joe,
There are a few ways of doing this but the easiest is as follows :
Replace field with '95' + substring(field,3) for Left(field,2) ='50'
This will replace all the records in the table matching the criteria - but beware if your table is in a multi user enviornment this will cause record locking contention.
Also, if it is a large table then this will not be particularly fast (unless you have an index key on Left(field,2))
Or...
Update tableName ;
Set field = '95' + substring(field,3) ;
Where Left(field,2) = '50'
or..... etc.
Cheers
Will
Hi All! How do you extract certain parts of a string. Like I want to replace the first three digits of a field with something. ie. 50-1020 with 95-1020
Anything that begins with 50- I want to replace it with 95-
Thanks in advance for your help!
Will Jones