Forum Discussion

Chad_Allen's avatar
Chad_Allen
Copper Contributor
Dec 12, 2023

Stored Procedure Formatting in SQL 2019

I've stumbled across a very odd formatting issue, when it comes to creating a stored procedure in SQL Server 2019. The exact version we're using is:

 

Microsoft SQL Server 2019 (RTM-CU20) (KB5024276) - 15.0.4312.2 (X64) Apr 1 2023 12:10:46 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor)

 

If I create a stored procedure, and then generate the ALTER script for it, all of the carriage returns in the

stored procedure disappear. The code in the stored procedure returned from the server is bunched up - it doesn't appear as I wrote it, at all.

 

I have never seen this behaviour before. 

 

Could this be an client issue, perhaps? I appear to be using SQL Server Management Studio 15.0.18424.0

 

Could there be a conflict between my client, and the server version?

 

Thanks.

 

 

 

Resources