-3

SQL Server テーブルに を含む列があり、大きな文字列には、 *Varchar(4000)が含まれる行に含める必要があります

文字列の例:

 *** CERPS Generated Case [06/25/2013 01:41:13 AM] C0   *** CREATED:  06/25/2013 AT 09:40 BY 0000000  AT RUHA *** CONTACT:  PHONE NUMBER 000-000-0000 X-0000 *** SPECIAL HANDLING CODE: 02 DELIVER WEEKDAY STATUS CODE: 33-VENDOR TRANSPORTATION DELAY MISSING SHIPT/ NOT LOCATED MISSING SHIPTS/ NOT LOCATED 

これは次のように表示する必要があります

*** CERPS Generated Case [06/25/2013 01:41:13 AM] C0
*** CREATED:  06/25/2013 AT 09:40 BY 0000000  AT RUHA
 *** CONTACT:  PHONE NUMBER 000-000-0000 X-0000
*** SPECIAL HANDLING CODE: 02 DELIVER WEEKDAY STATUS CODE: 33-VENDOR TRANSPORTATION DELAY MISSING SHIPT/ NOT LOCATED MISSING SHIPTS/ NOT LOCATED 
4

1 に答える 1

4

この目的はよくわかりませんが、SSMS で実行しようとしている場合は、次のクエリを使用すると思います。

declare @strPrint Varchar(2000)
select @strPrint=replace('*** CERPS Generated Case [06/25/2013 01:41:13 AM] C0   *** CREATED:  06/25/2013 AT 09:40 BY 0000000  AT RUHA *** CONTACT:  PHONE NUMBER 000-000-0000 X-0000 *** SPECIAL HANDLING CODE: 02 DELIVER WEEKDAY STATUS CODE: 33-VENDOR TRANSPORTATION DELAY MISSING SHIPT/ NOT LOCATED MISSING SHIPTS/ NOT LOCATED',
'***',char(10)+'***')
Print @strPrint
于 2013-07-25T19:56:49.567 に答える