/*
   سه شنبه, 16 آبان 1402 11:34:00 ب.ظ
   User: 
   Server: TAHERIAN
   Database: ATNDB
   Application: 
*/


Use ATNDBTest
Go
/*=============================================================================================================*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO

--Select CheckGetPayDetail.MatureDate
update CheckGetPayDetail Set
	MatureDate =  EffectiveDate
From 
	CheckGetPayDetail Inner Join
	CheckGetPayHeaderAndDetailList On CheckGetPayHeaderAndDetailList.CheckGetPayDetailSerial = CheckGetPayDetail.Serial
Where
	CheckGetPayHeaderAndDetailList.CheckGetPayHeaderKindSerial In (1,20) And
	ISNUMERIC(Replace(CheckGetPayDetail.MatureDate,'/','')) = 0


	--Select CheckGetPayDetail.IssueDate
update CheckGetPayDetail Set
	IssueDate = EffectiveDate
From 
	CheckGetPayDetail Inner Join
	CheckGetPayHeaderAndDetailList On CheckGetPayHeaderAndDetailList.CheckGetPayDetailSerial = CheckGetPayDetail.Serial
Where
	CheckGetPayHeaderAndDetailList.CheckGetPayHeaderKindSerial In (1,20) And
	ISNUMERIC(Replace(CheckGetPayDetail.IssueDate,'/','')) = 0



GO
COMMIT
