update dbo.LeaveDocuments set DataDay = convert(float , (
SELECT DATEDIFF(day, CreateTime , getdate()) AS no_of_days
FROM dbo.LeaveDocuments where LeaveID = 'ZYQJ2013030002'
)) where TaskID =188
update dbo.LeaveDocuments set DataDay = convert(float , ( SELECT DATEDIFF(day, CreateTime , getdate()) AS no_of_days FROM dbo.LeaveDocuments where LeaveID = 'ZYQJ2013030002' )) where TaskID =188
|