This is the code for cancelledDate in between Arrival and Departure Dates DECLARE @bookings TABLE(Booking_Skey INT, BookingNumber INT, ArrivalDate DATE, DepartureDate DATE,BookingDate DATE,CancelledDate DATE,BookingValue INT, PitchType_Skey INT,Site_Skey INT)insert into @bookingsSELECT 1313258, NULL, '02/01/2010', '04/01/2010', NULL, NULL, NULL, 3, 2 union allSELECT 1313259, NULL, '02/01/2010', '07/01/2010', NULL, NULL, NULL, 3, 2 union allSELECT 1313260, NULL, '02/01/2010', '15/01/2010', NULL, NULL, NULL, 3, 2 union allSELECT 1313261, NULL, '02/01/2010', '28/01/2010', NULL, NULL, NULL, 3, 2 union allSELECT 1313262, NULL, '02/01/2010', '03/01/2010', NULL, NULL, NULL, 3, 2UPDATE @bookingsSET CancelledDate = DATEADD ( DD, RAND(CHECKSUM(NEWID()))* DATEDIFF(DD, ArrivalDate, DepartureDate), ArrivalDate);SELECT * FROM @bookings
--Chandu