Question : Is there any way to programmatically detect the procedure name?

Is there any way to programmatically detect the procedure name while in the procedure?

I want to have a common error routine that I can copy and paste into each procedure which identifies it on error.

Answer : Is there any way to programmatically detect the procedure name?

What data type is [Dispatch ID]?  If it is text, try:

SELECT   [Dispatch ID],  [Impression],  [Destination Basis],  [Date Received],  [Date Enroute],  [Date Arrived],  [Date Leave Ref],  [Date Arrive Rec],  [Crew 2],  [First Name],  [Last Name],  [Date of Birth],  [Address Line 1],  [City],  [State],  [Zip Code],  [Gender],  [Age In Years],  [Trauma Code],  [EMD Card Number],  [Scene Grid],  [Receiving Other],  [Response Code],  [Mode to Ref],  [Mileage Loaded],  [Mode to Rec],  [Receiving Hospital],  [GCS First],  [GCS Last],  [Blood PressureD First], [Blood PressureS First], [Blood PressureD Last], [Blood PressureS Last], [Heart Rate First], [Heart Rate Last], [Respiration First], [Respiration Last], [Procedure Time], DConcat("[Procedure]","[Care Test Data]","[Dispatch ID] = '" & [Dispatch ID] & "'", ";")  AS Procedues
FROM [Care Test Data]
GROUP BY [Dispatch ID],  [Impression],  [Destination Basis],  [Date Received],  [Date Enroute],  [Date Arrived],  [Date Leave Ref],  [Date Arrive Rec],  [Crew 2],  [First Name],  [Last Name],  [Date of Birth],  [Address Line 1],  [City],  [State],  [Zip Code],  [Gender],  [Age In Years],  [Trauma Code],  [EMD Card Number],  [Scene Grid],  [Receiving Other],  [Response Code],  [Mode to Ref],  [Mileage Loaded],  [Mode to Rec],  [Receiving Hospital],  [GCS First],  [GCS Last],  [Blood PressureD First], [Blood PressureS First], [Blood PressureD Last], [Blood PressureS Last], [Heart Rate First], [Heart Rate Last], [Respiration First], [Respiration Last], [Procedure Time];
Random Solutions  
 
programming4us programming4us