Declare @D nvarchar(10)	
Declare @D1 Date	
Declare @E nvarchar(255)
Declare @Off bit

	DECLARE FetchNext CURSOR FOR
		SELECT  Date_SH , [Event] , ISOFF FROM CalendarOff_1401_2
	OPEN FetchNext
	Fetch Next From FetchNext Into @D,@E,@Off
	While @@FETCH_STATUS=0
	BEGIN

        select @D1 = dbo.ShamsiToMiladi(@D)  from CalendarOff_1401_2 where Date_SH Like @D
		insert into CalendarOff values(@D1,@E,@Off)

		Fetch Next From FetchNext Into @D,@E,@Off
	END
	Close FetchNext
	Deallocate FetchNext