Groups | Blog | Home
all groups > sql server dts > july 2006 >

sql server dts : destination file with three different rows with different number of column and column size


Dipa
7/14/2006 2:50:00 AM
I have three Stored Procedures in DTS, in which first stored procedure
is writing header row in destination file with four column.
Second procedure writing data into the destination file with 15 columns
Third stored procedure writing trailor row in data file with 4 column.

problem is if i map the resultant column of first stored procedure with
destination file and then map resultant column of second stored
procedure with destination file previous mapping is overwritten.


is there any way by which i can have three different rows with
different number of columns in each row and different sizes of columns.
Allan Mitchell
7/15/2006 2:42:57 AM
Hello Dipa,


Here's an idea


Throw them into 3 seperate flat files and then use the DOS COPY command to
add them together in a seperate file.


Allan


[quoted text, click to view]

Dipa
7/16/2006 9:56:21 PM
Hi,
Thanks a lot for replying.
Can you tell me in detail how can I do it DTS? Actually I dont know
much about DTS and DOS COPY command?

Thank you
Dipali


[quoted text, click to view]
Dipa
7/16/2006 9:56:46 PM
Hi,
Thanks a lot for replying.
Can you tell me in detail how can I do it DTS? Actually I dont know
much about DTS and DOS COPY command?

Thank you
Dipali


[quoted text, click to view]
Dipa
7/16/2006 10:08:53 PM
Hi,
Thanks a lot for replying.
Can you tell me in detail how can I do it DTS? Actually I dont know
much about DTS and DOS COPY command?

Thank you
Dipali


[quoted text, click to view]
Frans van Bree
7/17/2006 2:23:02 AM
In a Exceute SQL task:

DECLARE @CmdStr nvarchar(1000)
SET @CmdStr = 'copy file1.txt + file2.txt + file3.txt concatfile.txt'
Dipa
7/19/2006 2:01:31 AM
hi,
Thanks for your reply.
I tried doing cancatenating three file but they(people in my project)
dont want me to do it in that way i.e.( they dont want to split up the
result in to three destination file and then concatenate.)

can anybody tell me some other solution for this .
Please help me in this.

Thanks and regards
Dipali Dagliya



[quoted text, click to view]
Frans van Bree
7/19/2006 2:22:02 AM
You could try using a ActiveX script that
- connects to your database
- in some way captures the resultset of your stored procedures
- creates a filesystemobject
Dipa
7/19/2006 3:21:29 AM
Hi,

thanks .

Could you please explain me in detail? i dont know much about Active X
scipt.
What is filesystemobject? How to create it ?
can I take connection object and transformation task to execute stored
procedure from DTS tools.


Regards,
Dipali

[quoted text, click to view]
AddThis Social Bookmark Button