首页 > 解决方案 > 使用 REPLACE 将回车添加到字符串不起作用

问题描述

哪里有'〜'我想输入一个回车。

我希望数据看起来像这样。

   Computer software for processing patient identification.
   On-demand printable wristband.
   Providing a web-based system and on-line Portal.

我试过使用下面的代码,但它唯一做的就是删除'~'。

 SELECT REPLACE(' Computer software for processing patient identification.~  
 On-demand printable wristband.~  Providing a web-based system and on-line 
 Portal.~','~', CHAR(13)+CHAR(10));

知道如何添加回车吗?

先感谢您。

标签: sqltsql

解决方案


当我运行您的 SQL 查询并将查询输出复制到带有选项“显示 END 行”的 notpad++ 中时,我在屏幕下方。您的查询是正确的。在此处输入图像描述


推荐阅读