dbTalk Databases Forums  

Create Flatfile through DTS

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


Discuss Create Flatfile through DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Asim Siddiqui
 
Posts: n/a

Default Create Flatfile through DTS - 03-02-2006 , 01:24 PM






Hi Guys,

I am new to DTS Package and would appreciate your help. I need to create
a DTS package that send the output to a flatfile, I figured this thing
out and the output is fine but the problem is I need to send "0" and
"NA" for some fields that are not even in source tables. How can I do
that?

Example:
Tables Name: Student
Feilds:
StudentID
StudentName

Output FlatFile:
1,ABC,0,NA
2,XYZ,0,NA

These two fields 0 and NA do not exists in source table but I need this
kind of output to upload.

Thanks.


*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #2  
Old   
tbradshaw via SQLMonster.com
 
Posts: n/a

Default Re: Create Flatfile through DTS - 03-03-2006 , 09:01 AM






Asim,

It sounds like you're using a Transform Data Task to export data to your flat
file. Under the 'Source' tab, change the task source from 'Table/View' to
'SQL query'.

From there you can add dummy columns to simulate table output:

Select
StudentID,
StudentName,
0 as ExtraColumn1,
'N/A' as ExtraColumn2
from Student (Nolock)

Let us know how you make out.

- Tom

Thomas Bradshaw
MyWebGrocer.com
Data Integration Services

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums...r-dts/200603/1

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

Default Re: Create Flatfile through DTS - 03-03-2006 , 04:17 PM



Hello Asim,

Just because they are not in the source soes not mean they cannot be added.

SELECT.......,'N/A' as ColumnName, '0' as AnotherColumnName FROM................

Nothing particular to DTS here though

Allan Mitchell
www.SQLDTS.com
www.SQLIS.com
www.Konesans.com

Quote:
Hi Guys,

I am new to DTS Package and would appreciate your help. I need to
create a DTS package that send the output to a flatfile, I figured
this thing out and the output is fine but the problem is I need to
send "0" and "NA" for some fields that are not even in source tables.
How can I do that?

Example:
Tables Name: Student
Feilds:
StudentID
StudentName
Output FlatFile:
1,ABC,0,NA
2,XYZ,0,NA
These two fields 0 and NA do not exists in source table but I need
this kind of output to upload.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***




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.