Would using a table variable from a function be efficient?

20 pts.
Tags:
MSSQL
SQL tables
SQL variables
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

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: