Hi,

I have a sample stored procedure sp_get_employee_leave with:

SELECT employee_leave_day FROM employees WHERE employee_id = param_employee_id;

I want to know how can I call sp_get_employee_leave to get the data for all employees using a loop.. something like:

For (i=0; i<=rows_number_in_employees_table; i++)
{
print sp_get_employee_leave(i);
}

what's the best way to do it?


Thanks,
Jassim