Hi Community,
I've created a method in my File Service to do a cleanup for every file load. Currently, I've set it to delete data when LastUpdated date is greater than maxdate. However, I want to do a cleanup for every new file load. Any suggestions or advice on how to do this? Thanks!
Method Cleanup()
{
Set tMaxDate = ""
&SQL(SELECT Max(LastUpdated) into :tMaxDate
FROM MC_Table_Data.Patient)
&SQL(DELETE MC_Table_Data.Patient WHERE LastUpdated<:tMaxDate)
}