Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Column restriction Expand / Collapse
Author
Message
Posted Wednesday, December 12, 2012 4:47 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
I came acroos a problem shared by a developer in my firm,

He cretaes a SP & generates a report, now while doing this the columns of the reports are dynamically created & hence the max limit reaches upto 1024 columns..

But he wanted to add some more colimns in it.. how can this be solved

Any help








************************************
Every Dog has a Tail !!!!!
Post #1395592
Posted Wednesday, December 12, 2012 5:09 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 13, 2013 4:35 AM
Points: 386, Visits: 211
I would look at why you think you need more than 1024 columns in a report.



Cursors never.
DTS - only when needed and never to control.
Post #1395596
Posted Wednesday, December 12, 2012 5:19 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
Actually the information in the report which is required itself is more than 1024 columns...
how to get rid of this?








************************************
Every Dog has a Tail !!!!!
Post #1395598
Posted Wednesday, December 12, 2012 5:25 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, October 6, 2014 5:46 AM
Points: 2,840, Visits: 3,969
you can maintain the column's list in dtaabase and fetch with the help of additional parameter (says reportID ) in stored proc. see below
table defintion (ColumnID, ColumnName , reportID)

table will have

1, 'EmpName' , 45 (reportID)
2, 'salary' , 45
etc

So NOw with the help of additional param in SP , you cna retrieve the column list and use in your dynamically.
column addition can be done in above whenever developer ask


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1395599
Posted Wednesday, December 12, 2012 5:29 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, March 12, 2014 12:13 AM
Points: 258, Visits: 690
bhuvnesh, u mean to say that by adding an additional parameters in sp we can extend the columns more than 1024?







************************************
Every Dog has a Tail !!!!!
Post #1395603
Posted Wednesday, December 12, 2012 2:03 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, October 17, 2014 6:53 AM
Points: 1,669, Visits: 2,219
I think someone needs to rethink the idea that human beings are going to be able to make much use of a report with 1024 + columns. The idea that anyone could possibly need all 1,024 + all at the same time is absurd, unless they plan on subjecting that data to analysis in Excel or some other analysis tool, in which case maybe it's time to find out what the analysis needs to be and re-think what the report really needs to do. Maybe it should be an ETL process instead that loads a spreadsheet with the data, but a report with that many columns makes absolutely no sense at all.


Steve
(aka sgmunson)

Internet ATM Machine
Post #1395884
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse