SQLTeam.com | Weblogs | Forums

Create a wide table in SQL server 2016 "failed"

tsql
sql2014

#1

With this code(*), the creation of a wide table in SQL keeps me sending this:

               Msg 1702, Level 16, State 1, Line 11
              CREATE TABLE failed because column '2010/12/01' in table 'PriceToBookFinalI' exceeds the maximum of 1024 columns.
                    USE [Style]
                    GO

                   CREATE TABLE [dbo].[PriceToBookFinalI]
                   (DocID int PRIMARY KEY,
                   [2006/12/29][Money],
                   [2007/01/01][Money],
                    ...
                   SpecialPurposeColumns XML COLUMN_SET FOR ALL_SPARSE_COLUMNS);  

                   GO

(2614 columns)

Looking for a good hint because I don't know how to solve it!


#2

https://technet.microsoft.com/en-us/library/ms143432(v=sql.110).aspx