Hi allI have gotten a lot of help with this stored procedure to get it to this point, let me explain what it does then explain what I need.The stored procedure checks if there are appointments on a particular day, if there are not any it creates appointment times based on a start time and end time from another table. What I was doing was every newly created appointment had the same IsAvailable. However now I need to check for AppointmentTime of 12:00 and have it create with IsAvailable as false. I am not sure this makes any sense at all. If it does I need help.Thank youif not exists(select 1 from [dbo].[Appointments] where AppointmentDate = @appointmentDate) With TimeSlots (TimeSlot, EndTime) AS ( select StartTime, EndTime from[dbo].[AppointmentTimes] a WHERE DayOfWeekName = DATENAME(dw, @appointmentDate) union all select DATEADD(hh,1,TimeSlot), EndTime from TimeSlots where DATEADD(hh,1,TimeSlot) <= EndTime ) insert into [dbo].[Appointments](AppointmentTime, AppointmentTimeNonFormat, AppointmentDate, IsAvailable) select TimeSlot, TimeSlot, @appointmentdate, @isAvailable from TimeSlots if exists(select 1 from [dbo].[Appointments] where AppointmentDate = @appointmentDate) select CONVERT(VarChar(15), AppointmentTime, 100) AS AppointmentTime, AppointmentTimeNonFormat, AppointmentDate, IsAvailable from [dbo].[Appointments] where AppointmentDate = @appointmentDate else select CONVERT(VarChar(15), AppointmentTime, 100) AS AppointmentTime, AppointmentTimeNonFormat, AppointmentDate, IsAvailable from [dbo].[Appointments] where AppointmentDate = @appointmentDate