DacFx icon indicating copy to clipboard operation
DacFx copied to clipboard

SSDT error SQL71526 on stored procedure.

Open hacitandogan opened this issue 11 months ago • 2 comments

  • SqlPackage or DacFx Version: ////////////////////////////////////////////////////////// Microsoft Visual Studio Community 2022 Version 17.9.0 VisualStudio.17.Release/17.9.0+34607.119 Microsoft .NET Framework Version 4.8.04161

SQL Server Data Tools 17.9.51.1 Microsoft SQL Server Data Tools //////////////////////////////////////////////////////////

Steps to Reproduce:

There is a stored procedure which is working fine on SSMS. But same stored procedure is failing with below error in SSDT ;

SQL71526: A table that has a defined column set can have up to 30,000 columns with a maximum of 1024 non-sparse and computed columns. Tables that do not have column sets are limited to 1024 columns.

image

The line number highlighted in the message corresponds to a CTE in this SP. (which only has 10 columns ). If we expand the asterisk (*) in the select list of this CTE to column names , the issue disappears.

(DacFx/SSDT)

hacitandogan avatar Mar 05 '24 12:03 hacitandogan

@hacitandogan can you please put an example for the procedure?

llali avatar Mar 06 '24 17:03 llali

@llali , obfuscated_sp.txt I am sharing an obfuscated / simplified version of the sp attached.

hacitandogan avatar Mar 22 '24 13:03 hacitandogan