all groups > sql server dts > july 2003 >
You're in the

sql server dts

group:

single DTS for changing text file(column number changes)


single DTS for changing text file(column number changes) rajesh
7/20/2003 8:32:58 PM
sql server dts:
I have a dts package which takes input as text file name(
from global variable) and then transfer the data to a
table.I run this dts package from c# program by assigning
different file name. Each time it loads to the same table.

The new requirement has come. The input file is a
tabdelimited file. Normally it has 4 coulmn fields. But in
some case it may have 6 column fields.

In current approch I am mapping the file column field to
database column field.

Is there a way to transfer data to database-
1. if tab delimited file does not have additional field
insert null in those field to database table
2. if additional filed are present pass all the data to
database.

currently if a make a dts with total text file field 6 and
map it to database table with field, It is working fine
only if input text file has 6 column. If it has only 4
column it gives error saying (rest two field not present)


How can I resolve the issue within DTS.
I will appreciate any help.

thanks
Re: single DTS for changing text file(column number changes) Allan Mitchell
7/21/2003 8:09:38 AM
Why do you not set up two datapump tasks (1 for width = 4 and 1 for width =
6). Test the file in an AX Script before the datapumps and after
ddetermining the format enable the correct pump , disable the other using
workflow.

Multiple Paths in Workflow
http://www.sqldts.com/default.aspx?6,103,218,7,1

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



[quoted text, click to view]

AddThis Social Bookmark Button