Re: Bypass step when source file empty

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Isak Dinesen (no5pam_at_hotmail.com)
Date: 05/17/04


Date: Mon, 17 May 2004 17:45:53 GMT

DTS doesn't like 0-byte files, so the simplest way to do this I've found
work around this is to initilize the file with some bytes in the first row.
A good place to start would be outputting a header row, but if you don't
have time to update your legacy systems to do that, there are other options.
For eample, if you are using csv format, put an empty crlf on the first line
(or ,,,,), then define the connection to ignore the first line. If you are
using fixed format, you'll need to put the exact number of spaces on the
first line as is used on all subsequent lines.

HTH

"K" <anonymous@discussions.microsoft.com> wrote in message
news:EC179561-DAE0-4E33-ABFF-C6001EEF417A@microsoft.com...
> Hello Quentin,
>
> You could achieve this via an active x script. Please read more about
"FileSystemObject"s.
>
> hth,
> K
>
> ----- Quentin Ran wrote: -----
>
> Hi group,
>
> I have a DTS package where one of the step is to load a flat file
into a sql
> table. The source file can sometimes be empty. How can I avoid an
error
> state from this step FOR ONLY THIS (other failure should still be
observed)
> and continue executing the following steps that have work flow
dependency on
> this step, when this file comes in empty?
>
> Advise/sample code greatly appreciated.
>
> Quentin
>
>
>



Relevant Pages

  • Re: DTS bug (?): Data Driven Query Task incorrectly replaces empty strings with NULL.
    ... DataPump task works as expected so it is not something that DTS cannot ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... >> Allan Mitchell MCSE,MCDBA, ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS bug (?): Data Driven Query Task incorrectly replaces empty strings with NULL.
    ... DataPump task works as expected so it is not something that DTS cannot ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... >> Allan Mitchell MCSE,MCDBA, ...
    (microsoft.public.sqlserver.server)
  • Re: import excel data error
    ... What will be happening is that although it looks empty to you it won't be to ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... www.SQLDTS.com - The site for all your DTS needs. ... > the same column as the excel file. ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS from Excel with empty cell
    ... Ok So you want to skip an import of an excel row if a field is empty ... Allan Mitchell MCSE,MCDBA, www.SQLDTS.com - The site for all your DTS needs. ... >I have currently trying to import an excel spreadsheet with named cells> to SQL thr DTS.. ... > My problem is that how to I skip those cell that are empty in the> spreadsheet using DTS activeX? ...
    (microsoft.public.sqlserver.dts)
  • RE: Inconsistencies in running a DTS
    ... For what its worth, please review the following article and get back to me. ... HTH, ... Im running a DTS that ...
    (microsoft.public.sqlserver.dts)