Re: Remove Field Terminators from Null Columns in DTS Export

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

From: Mike Sayko (saykomj_at_yahoo.com)
Date: 03/22/04


Date: 21 Mar 2004 23:28:35 -0800

Partha Mandayam <mcp111@hotmail.com> wrote in message news:<Ohk2r93DEHA.712@tk2msftngp13.phx.gbl>...
> if not isnull(DTSSource("col001") then
> dtsdestination("col001")=dtssource("col001")
>
> and so on for all columns.
> This will only copy the non-null columns to the output
>
>
> Regards
>
> Partha Mandayam
> Software Consultant
> Home page: http://partha.tripod.com
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Partha,

As I said, your obvious solution will not work. This problem is the
reverse of the issues group members have often shared here on Nulls
with Excel and fixed width flat files. Only trailing null columns
need to be excluded per row. Null columns are common in the middle of
two columns with data and must be exported as null. Successive column
delimiters are only prohibited between the last column of data for a
given row and the row delimiter. Hopefully the following sample will
better illustrate the problem. Thanks.

Column delimiter = '*'
Row delimiter = '~'

Current Result: SE*1*XXXXXX****123*U*********~
                ISY*D*00* *321******0******~
Desired Result: SE*1*XXXXXX****123*U~
                ISY*D*00* *321******0~

Regards,
Mike Sayko
Triad Research, Inc.



Relevant Pages

  • Re: cant import Excel
    ... You could try reinstalling ... Regards ... Partha Mandayam ... Software Consultant ...
    (microsoft.public.sqlserver.dts)
  • Re: start vb exe from dts package
    ... the path to the vb exe. ... Regards ... Partha Mandayam ... Software Consultant ...
    (microsoft.public.sqlserver.dts)
  • Re: DBF File
    ... then use an execute sql task to ... Regards ... Partha Mandayam ... Software Consultant ...
    (microsoft.public.sqlserver.dts)
  • Re: as400
    ... provider for db2 and then access the data using openquery ... Regards ... Partha Mandayam ... Software Consultant ...
    (microsoft.public.sqlserver.dts)
  • Re: How to select rows with duplicate value in one column?
    ... Please post table structure with keys. ... Regards ... Partha Mandayam ... Software Consultant ...
    (microsoft.public.sqlserver.programming)