hi,
This is my first step to learning to write Stored Procedures. Can some one review this and help me improve in writing more efficient code? Please correct me if there's some wrong usage or
a better way to have programmed the same. I have attached the SP in the text file beneath.
This SP accepts 4 input parameters and returns 2 output parameters (lOEmp and A_EMP_IVC). Of the 4 I/p parameters, only one (bUnderPaid) is mandatory. The 2 dates (dtWeekBeign and dtWeekEnd) should both be present or neither. If the dates aren't passed then the Employee Number (lOEmp) has to be passed. This validation will be taken care of at the user interface. I execute the SP as this:
Code:
Declare @A_EMP_IVC  INTEGER
Declare  @O_EMP INTEGER
EXEC hr_spX0002Q @lOemp=1313, @bUnderPaid='FALSE', @A_EMP_IVC =@A_EMP_IVC OUTPUT, @O_EMP = @O_EMP OUTPUT
PRINT @A_EMP_IVC
PRINT @O_EMP
thanks,
Jemima.