notepad++批量替换技巧打开 notepad++,
将从sql server中查到的某列数据 copy到 notepad++,
如图所⽰:
notepad++开始操作,
1) ctrl + F
search: ^
replace what: ,'
wrap around: checked
search mode: Regular expression
click button: replace all
如图:
2)
search: \r\n
replace with: '\r\n
wrap around: checked
search mode: extended (\n, \r, \t, \0, \x.... ) click button: replace all
如图:
3), ⾸尾的数据⾏稍微处理⼀下,
copy到你要的地⽅,即可。
eg:
SELECT [Key], [Name] as CityName
FROM KBSERVICE.DBO.GEOGRAPHYTIER_New A WHERE [Key]
IN
(
'3EAA64A5-3701-4E6A-87C3-2AC3A7613458'
,'784FCC9D-F967-4230-9B5B-1713A0E5F94F' ,'9DBD3BEE-EFDB-4124-A7D9-A0D24596B40E' ,'FB6BC3A9-5863-4E52-944F-62E7E5AD550D' ,'3B695D94-B7CC-4E12-9212-4B3F8B382AB7' ,'9DBD3BEE-EFDB-4124-A7D9-A0D24596B40E' ,'3B695D94-B7CC-4E12-9212-4B3F8B382AB7' ,'C57B190F-5EB7-4546-923C-469C6A8B1BA0' ,'DBD83D1A-57E5-468C-A8A3-822A48EF49F9' ,'3
ED5AF3F-0DCF-4D98-BFA7-754BC18FD78E' ,'757D51EE-130B-43E6-B0B7-73E3B18823FB' ,'F047191F-188D-47FF-B125-D5CDF01621ED' ,'85FDCC91-A1E9-4EC8-9CE4-3391357CB3DC'
------
)
(结束)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论