20 pts.
 Would using a table variable from a function be efficient?
We divided our tables from table zone_a, ..._b, ..._c to zone_z, these tables have the same attributes. We have divided this tables in this way so that any data that is under zone_a would only be on it's specific table, and the same with the other remaining table. Since per table holds thousands of data per day we have decided it to be designed this way and also hoping to reduce lock up of tables everytime a user accesses the table. Now, we made a function that returns a table. This function will handle what table is to be selected. The body of this function contains a table variable, it holds the data from the selected table. This function will return the table variable We have made this function hoping that it would be efficient to use for other future procedures. Is it efficient? Thank You in advance.

Software/Hardware used:
MSSql Server
ASKED: May 19, 2010  7:16 AM
UPDATED: May 19, 2010  1:58 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _