Used to update the filenames missing extentions

   ;WITH TopFiles AS (

        SELECT  *

        FROM tbl_attachments

        WHERE File_Type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'

          AND RIGHT(File_Name, 5) != '.xlsx'

          AND RIGHT(File_Name, 4) != '.xls'

    )

    UPDATE TopFiles

    SET File_Name = File_Name + '.xlsx';

Comments

Popular posts from this blog

on mouse hover show icons