SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Column restriction


Column restriction

Author
Message
OnlyOneRJ
OnlyOneRJ
Old Hand
Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)

Group: General Forum Members
Points: 346 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 w00t

Any help

************************************
Every Dog has a Tail !!!!! :-D
nigelrivett
nigelrivett
SSC-Addicted
SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)

Group: General Forum Members
Points: 480 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.

OnlyOneRJ
OnlyOneRJ
Old Hand
Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)

Group: General Forum Members
Points: 346 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 !!!!! :-D
Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5238 Visits: 4076
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;-)
OnlyOneRJ
OnlyOneRJ
Old Hand
Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)Old Hand (346 reputation)

Group: General Forum Members
Points: 346 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 !!!!! :-D
sgmunson
sgmunson
SSCertifiable
SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)SSCertifiable (7K reputation)

Group: General Forum Members
Points: 6989 Visits: 4373
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)
Smile Smile Smile
Health & Nutrition
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search