set nocount ON
-- truncate Table [dbo].[G2PDate]
DECLARE @DATE as DATETIME
SET @DATE='2001-1-1'
WHILE @DATE < '2100-1-1'
BEGIN
	if not exists(SELECT PDATE FROM G2PDATE WHERE GDATE=@DATE)
		INSERT G2PDATE(GDATE,PDate) Values(@Date,dbo.FARSI_DATE2(@DATE))
	SET @DATE=DATEADD(DAY,1,@DATE)
END
