I need to update a group of cells by inserting the same two characters into all of them, but I'm just drawing a blank on how to do this. Could someone point me in the right direction?
Old Cells
HI.1
HI.2
HII.1
New Cells
H08I.1
H08I.2
H08II.1
I need to update a group of cells by inserting the same two characters into all of them, but I'm just drawing a blank on how to do this. Could someone point me in the right direction?
Old Cells
HI.1
HI.2
HII.1
New Cells
H08I.1
H08I.2
H08II.1
If all your cells look like that:
update cells
set cell = Replace(cell,'H','H08');
(But note that Replace doesn't care where the 'H' appears).
Note: I am assumign we are talking about SQL and tables here - maybe a "cell" is something else?
UPDATE Cells SET Cell = LEFT(Cell, 1) + '08' + SUBSTRING(Cell, 1, LEN(Cell)-1)