DECLARE @ErrMsg varchar(1000) DECLARE @EncounterServiceDates EncounterServiceDatesType INSERT @EncounterServiceDates (indexId,unitOfDay,dayOfMonth,dateOfMonth) VALUES (0,1,11,'9/11/2016 12:00:00 AM'), (1,1,12,'9/12/2016 12:00:00 AM'), (2,1,13,'9/13/2016 12:00:00 AM') EXEC [usp_EncounterSaveValidate] 427,4,12,9,2016,@ErrMsg output,@EncounterServiceDates PRINT @ErrMsg */ ALTER PROCEDURE [dbo].[usp_EncounterSaveValidate] ( @EpisodeNo INT ,@ProviderId INT ,@ServiceId INT ,@Month INT ,@Year INT ,@ErrorMessage VARCHAR(1000) OUTPUT ,@EncounterServiceDates EncounterServiceDatesType ReadOnly ) AS BEGIN
SQL SERVER 2012 - the location of the table type parameter does not matter, you need to make sure the sequence when transmitting data, you can check the above code, which works fine when the table type parameter is on the last.
source share