Added procedure to dynamically pass in table name to be selected