Promote Document Version Notes to Document Notes

Promote Document Version Notes to Document Notes




  1. --The following script will promote document version notes
  2. --into document notes.  This is useful when a destination system
  3. --supports notes on documents but does not support notes on
  4. --specific document versions.
  5. --
  6. --If you are using this script, you should inform the client that 
  7. --Their version notes will no longer be attached to the version
  8. --as that is a limitation of the destination system.
  9. UPDATE
  10. __M_Common_Notes
  11. SET
  12. Final_Parent_Type = '__M_Documents_Digital_Files',
  13. Final_Parent_Id = Versions.Final_DocumentFile_Id
  14. FROM
  15. __M_Common_Notes Notes,
  16. __M_Documents_Digital_Files_Versions Versions
  17. WHERE 1=1
  18. AND Notes.Final_Parent_Type = '__M_Documents_Digital_Files_Versions'
  19. AND Notes.Final_Parent_Id = Versions.Id