declare @foo varchar(50)
set @foo = '1.1.1.1'
select replace(@foo, '1.1','1.2')
This gives me 1.2.1.2 as it replaces all occurrences of 1.1 in @foo, how would I only replace the beginning of @foo with 1.2?
I will always know the length of the string to replace if that helps?
set @foo = '1.1.1.1'
select replace(@foo, '1.1','1.2')
This gives me 1.2.1.2 as it replaces all occurrences of 1.1 in @foo, how would I only replace the beginning of @foo with 1.2?
I will always know the length of the string to replace if that helps?