dbTalk Databases Forums  

TXT File Transformation to Two Tables?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss TXT File Transformation to Two Tables? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Erik Grob \(MCP\)
 
Posts: n/a

Default TXT File Transformation to Two Tables? - 10-23-2004 , 11:43 AM






Part of my DTS Package needs to take a flat file and transform 40 of the
columns to 1 staging table, and 10 columns to another staging table.

How do I do this so that I can see if BOTH transactions were Successul?

I have this now

TXT------(40cols)------SQL Table:StagingAsset
Quote:

(10cols)



SQL Table:StagingVendor

I'm sure I'm not doing this right (using a best practice).

-Erik




Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: TXT File Transformation to Two Tables? - 10-23-2004 , 12:00 PM






The way I would do this is to have the text file imported to a working table
"AS IS" and then use TSQL to do the moving of the relevant columns

Whilst you can do it in one hit, this involves using Lookups and these
operate Row * Row

--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Erik Grob (MCP)" <erikg (AT) pcslink (DOT) com> wrote

Quote:
Part of my DTS Package needs to take a flat file and transform 40 of the
columns to 1 staging table, and 10 columns to another staging table.

How do I do this so that I can see if BOTH transactions were Successul?

I have this now

TXT------(40cols)------SQL Table:StagingAsset
|
|
(10cols)
|
|
|
SQL Table:StagingVendor

I'm sure I'm not doing this right (using a best practice).

-Erik





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.