| |

VerySource

 Forgot password?
 Register
Search
Author: wcckuand

Use of replace

[Copy link]

0

Threads

93

Posts

46.00

Credits

Newbie

Rank: 1

Credits
46.00

 China

Post time: 2020-4-6 17:15:01
| Show all posts
declare @sql varchar (1000)
set @sql = '<Cmd> MAReport </ Cmd>'
select stuff (@ sql, charindex ('<Cmd>', @ sql) + len ('<Cmd>'), charindex ('</ Cmd>', @ sql)-(len ('<Cmd>') + 1), 'Chinese')-the character to be replaced here

------------------------------
<Cmd> Chinese </ Cmd>

(The number of rows affected is 1 row)
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list