How can I pass the values in a table to a procedure?