• Try running the following code:

    SELECT LTRIM(SUBSTRING (Col1, 1, 20)) AS 'DateTimeStamp',

    LTRIM(SUBSTRING(Col1, 71, 6)) AS 'LSN',

    LTRIM(SUBSTRING (Col1, 21, 18)) AS 'FileSize',

    LTRIM(SUBSTRING (Col1, 40, 1000)) AS 'FileName1'

    FROM #OriginalFileList

    WHERE TRY_PARSE(LTRIM(SUBSTRING (Col1, 1, 20)) AS DATETIME) IS NULL

    ORDER BY LSN

    This should list all rows where it cannot convert the first substring to DATETIME.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA