|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Today @ 2:58 PM
Points: 1,455,
Visits: 14,246
|
|
gcresse (2/13/2012) I just read this article about SQL Server 2012's new features (http://blog.tallan.com/2011/12/08/sql-server-2012-windowing-functions-part-1-of-2-running-and-sliding-aggregates/) and I'm thinking it *might* solve my problem, as long as I can join to other tables. I had to give up on the Quirky Update because I had to try to jam every column I needed into the same row and in some cases the row was too wide for SQL Server to handle.
whilst you wait for 2012.....could you consider creating a temp table from all of your sub queries / joins etc....and then running QU on the temp table?
__________________________________________________________________ you can lead a user to data....but you cannot make them think ! __________________________________________________________________
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Yesterday @ 8:51 AM
Points: 68,
Visits: 359
|
|
| The temp table would not be wide enough. I need the ability to calculate running percents on each component in the final product, and often times there are thousands of them.
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Today @ 2:58 PM
Points: 1,455,
Visits: 14,246
|
|
gcresse (2/13/2012) The temp table would not be wide enough. I need the ability to calculate running percents on each component in the final product, and often times there are thousands of them.
ok.. I cant see what you can see......but in your situation then I would be asking myself "why have I got too many columns...should I be thinking about rows instead?"...I assume this is what you mean by "not be wide enough"
anyway good luck.
kind regards
__________________________________________________________________ you can lead a user to data....but you cannot make them think ! __________________________________________________________________
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 5:33 PM
Points: 32,902,
Visits: 26,783
|
|
J Livingston SQL (2/13/2012)
gcresse (2/13/2012) The temp table would not be wide enough. I need the ability to calculate running percents on each component in the final product, and often times there are thousands of them.ok.. I cant see what you can see......but in your situation then I would be asking myself "why have I got too many columns...should I be thinking about rows instead?"...I assume this is what you mean by "not be wide enough" anyway good luck. kind regards
I agree... think rows instead of columns here even if you don't use the QU.
As a sidebar, any process that has thousands of steps should probably be reevaluated a bit. 
As another sidebar, can you move the discussion about such a wide table to a new thread, please? Thanks.
--Jeff Moden "RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following... http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following... http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
|
|
|
|