I want output in this format
Could anyone help me to write Stored Procedure in a dynamic way
@PDate(datetime) | @In_Punch(datetime) | @Out_Punch(datetime)
| Status(VARCHAR(MAX))
|
Consider for any month | Between 08:00 AM to 09:30AM | Between 04:00 PM to 05:30 PM | P |
| @In_Punch > 09:30 AM | @Out_Punch <=03:59 PM | HL |
| @In_Punch = NULL | @ Out _Punch = NULL | A |