• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

Replace Left x Characters in a string

Hi,

Hopefully a very simple one -  I would like to replace the Left 4 characters in a string with an '01' where the string length is 10 characters in SQL.

What would the script be?
0
adamcutting
Asked:
adamcutting
1 Solution
 
BinuthCommented:
select replace(txt,left(txt,4),'01') from tableName where len(txt) = 10
0
 
adamcuttingAuthor Commented:
Thank!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now