Storing values until ready to write to table - best way to do it

Using stored procedures to calculate - data has about 15 records all related to one test - each having tehir own set of calculated results.  We hav to loop through them - Debating right now what would be the best way to stor this data - write each calculation into a temporary table, wait until the whole row of calculations are done and then write to final table, cursors (although I don't think that'd be a good idea) just use variables - an array doens't meet our needs.  A hash table woudl but is their an equivalent in stored procedures??
MosquitoeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
>write each calculation into a temporary table, wait until the whole row of calculations are done and then write to final table
This is a better option and even better option will be the one which replaces the temp table with a table variable
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MosquitoeAuthor Commented:

What is a table variable?  
0
Aneesh RetnakaranDatabase AdministratorCommented:
table variable is similat to TempTable , you can use it as u use a temp table;also it has some performance gain over temp tables if you deal with less no of records


declare @Tab Table( i int, name varchar(100) )
0
MosquitoeAuthor Commented:

Can you supply me with a link on MSDN - I cannot find it ..
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.