AnsweredAssumed Answered

Archive Files location

Question asked by scott.davies on Jan 10, 2018

Does anyone know which tables archive files are in relation to courses?

 

Currently I can get the CourseID out of the file name by string manipulation (ie below) but I'm sure there would be a File_ID relationship to crsmain_pk1 for archives?

 

SELECT SUBSTRING(FILE_NAME, LEN(LEFT(FILE_NAME, CHARINDEX ('ArchiveFile_', FILE_NAME))) + 12, LEN(FILE_NAME) - LEN(LEFT(FILE_NAME, CHARINDEX ('ArchiveFile_', FILE_NAME))) - LEN(RIGHT(FILE_NAME, LEN(FILE_NAME) - CHARINDEX ('.zip', FILE_NAME))) - 27) , FILE_NAME , CREATION_DATE ,FILE_SIZE from [BBLEARN_cms_doc].[dbo].[XYF_URLS] URLs join [BBLEARN_cms_doc].[dbo].[XYF_FILES] files on files.FILE_ID = URLs.FILE_ID where [FILE_NAME] like 'ArchiveFile_%.zip' and MIME_TYPE='application/zip'

 

Any help would be amazing!

Outcomes