Loading Flat File using DTS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amorphous999

    Loading Flat File using DTS

    I want to use DTS to load from a flat file. But I can't be sure when
    the flat file will arrive. I would like the job to check every 10
    minutes or so for a couple of hours. If the file is present, then load
    the file and rename it so that it doesn't get overwritten. Any
    suggestions?

    TIA,

    amorphous999

  • TLetsek

    #2
    Re: Loading Flat File using DTS

    Why not create the DTS package as if the file exists, and if it doesn't let
    the package fail!
    Set up a job to run the package every x number of minutes, if the file is
    there it will load
    if the file's not there the package will fail and the job will execute again
    in another x minutes.

    Of course the last step of your package will be to delete the file after it
    loads, so it doesn't
    keep appending the info to the database.

    We have several similar packages we run and just let them fail when the
    file's not there, not
    very pretty but who cares! It works and the import only takes 10 seconds
    anyway.

    "amorphous9 99" <jfobrien1458@h otmail.com> wrote in message
    news:1117744931 .123546.5010@o1 3g2000cwo.googl egroups.com...[color=blue]
    > I want to use DTS to load from a flat file. But I can't be sure when
    > the flat file will arrive. I would like the job to check every 10
    > minutes or so for a couple of hours. If the file is present, then load
    > the file and rename it so that it doesn't get overwritten. Any
    > suggestions?
    >
    > TIA,
    >
    > amorphous999
    >[/color]


    Comment

    • Simon Hayes

      #3
      Re: Loading Flat File using DTS

      You could put in an ActiveX step to check if the file is there - if it
      is, the package continues, if not, then it returns, quits, logs an
      error or anything else you want it to do. This article might be useful:



      Simon

      Comment

      • amorphous999

        #4
        Re: Loading Flat File using DTS

        Thanks for the URL! I'll give it a try.

        Simon Hayes wrote:[color=blue]
        > You could put in an ActiveX step to check if the file is there - if it
        > is, the package continues, if not, then it returns, quits, logs an
        > error or anything else you want it to do. This article might be useful:
        >
        > http://www.sqldts.com/default.aspx?292
        >
        > Simon[/color]

        Comment

        Working...