Link to home
Start Free TrialLog in
Avatar of Mosquitoe
MosquitoeFlag for Canada

asked on

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??
ASKER CERTIFIED SOLUTION
Avatar of Aneesh
Aneesh
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mosquitoe

ASKER


What is a table variable?  
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) )

Can you supply me with a link on MSDN - I cannot find it ..