SQL server 2012 SP_HELPTEXT extra lines issue

前端 未结 8 1780
生来不讨喜
生来不讨喜 2020-12-31 01:33

I am using SQL server 2012, & always use SP_HELPTEXT to get my previously created Stored Procedures, In previous versions of SQL server there were no issues

8条回答
  •  傲寒
    傲寒 (楼主)
    2020-12-31 02:17

    I wrote another workaround that just replaces the CrLf:

    DECLARE @results table ([Text] nvarchar(255))
    
    INSERT @results
    Exec sp_helptext spStudyRoleCacheFlushNotificationGet
    
    SELECT REPLACE(REPLACE([Text], CHAR(10), ''), CHAR(13), '')
    FROM @results
    

提交回复
热议问题