Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2004

    Unanswered: SSIS Questions: Import files with filenames that change and/or empty files and/or bad

    FIRST QUESTION: file names that change. How do I specify in the flat file source a file name that can change (that is parameter driven)?

    I am importing 25 files using SSIS. The file names change as follows:

    Yesterday's File: Claim_header.2455307
    Today's file: Claim_header.2455308
    Tomorrows file: Claim_header.2455309

    The number is a Julian date. There is an activeX script task that calculates it and sets a parameter called gsJulianDate.

    SECOND QUESTION: we get files that have no data. Normal. Is there a way to detect an empty file before trying to load it?

    THIRD QUESTION: There are often bad dates. Stuff like 5/1/2210. Out of range for smallDateTime. Is there a simple way to handle these? A filter perhaps? Or some other trick?

    Appreciate your time and help.


  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Is there any harm in trying to load an empty file?
    If it is really a problem then I suggest you perform the check in your ActiveX script
    Dim fso
    Dim file
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set file = fso.GetFile("C:\yourfile.txt")
    If fso.Size > 0 Then
      ' File isn't empty
      ' File IS empty
    End If
    As for the validation - once again, ActiveX should be your friend here.
    Home | Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts