Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create a table with 180+ fields?
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008 R2
Application:
Web
Miscellaneous
Thread ID:
01600848
Message ID:
01600859
Views:
50
>>Hi
>>I need to create a table with 2 character fields ( field1, field2 ) then fields of BIT type, default to 0 (false) , named
>>[0501], [0502] [0503].....and up to [1029], [1030], [1031]
>>Where 0501 represents May 1, etc... ( format mmdd)
>>Is there some way to program sql server to build this?
>>
>>Thanks
>>Jaime
>
>Sounds like you're looking for dynamic pivot. How are you going to consume that table? It may be easier to produce such result in SSRS.

Exactly Naomi. My original table is Field1, Field2, FromDate, ToDate. I need to display this either in a html or a pdf report, as a Gantt. I am using Alpha Anywhere to generate the report ( ie xBasic / Javascript combination ). Since i didn't know how to generate the requested pivot i decided to build the above as a table, then i'll write a small function that will just plot the correct values in the pivotted table.
Why do programs stop working correctly as soon as you leave the Fox?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform