Hello - Wanted to get some guidance regarding best practices on when to use a View vs a Temp Table in Stored Procedures.
Is there any downfall to using a View for a stored Procedure over using a Temp Table?
The database I am working in is a datawarehouse that is updated once a month. I tend to lean towards using a View because I can always look back on the results in the view if I have questions during that month on how a particlar field was dervied during load.
All that said, I wanted to see id anyone had information on this topic to share? Is a Temp Table better, if so...why? Is it simply a matter of personal preference?
Thanks in advance for yoru time.