Write a stored procedure that accepts one input argument which defines the status of event manager to either ‘Senior’ or ‘Junior’. The input argument states the minimum number of engagements handled by the event manager in order to be a senior. For instance, if 3 is given as the input argument, event managers who have handled at least 2 engagements are promoted to ‘Senior’. Otherwise, the stored procedure should set the status to ‘Junior’.
Above is the question.
.. anyone can help me .Following is my solution
create procedure PRC_Min(IN Min INT)
((Select COUNT(Staff_id) from Engagement
where Event_manager.Staff_id=Engagement.Staff_id) >= Min)
set Status= 'Senior';
set Status= 'Junior';
Event_manager table just consist of staff info..
Engagement table having all date.. location.. etc
SQL0206N "EVENT_MANAGER.STAFF_ID " is not valid in the context where it is used.