Hi,
I have employee_benefits MySQL table with the following fields:
employee_benefit_id --- autonumber
employee_id
benefit_category
benefit_description
benefit_amount
I want to loop through all records in the above table and insert the values into salary_slips table which has the following fields:
salary_slip_id --- autonumber
document_id ---- forget this it's just UUID
employee_id -- from employee_id in [B]employee_benefits[/B]
slip_month -- from SP variable [B]param_slip_month[/B]
slip_year -- from SP variable [B]param_slip_year[/B]
and then I want to insert data into salary_slips_details:
salary_slip_details_id --- autonumber
salary_slip_id -- the id from [B]salary_slips[/B] table
slip_details_description -- benefit_description from [B]employee_benefits[/B] table
slip_details_amount -- benefit_amount from [B]employee_benefits[/B] table
How can I do this complicated query please?
Thanks,
Jassim