Convert a character in the string into a specified character! For example, in 2-36-54-1 - replace with "Annual Month Day&qu

xiaoxiao2021-03-06  35

Declare @cc char (10), @ i int, @ aa char (20), @ bb int search @ cc = 'Year of the year, @ aa =' 2-36-54-1 ', @ bb = 1, @ i = 1 / * Put the number in the number * / while @BB! = 0 Begin select @ bb = charIndex ('-', @ aa) if @ bb = 0 Break else select @ aa = stuff ( @ aa, @BB, 1, Substring (@ cc, @ i, 1)) set @ i = @ i 1 End Select @AA

转载请注明原文地址:https://www.9cbs.com/read-60611.html

New Post(0)