![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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. |
#3
| |||
| |||
|
|
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 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. |
#4
| |||
| |||
|
|
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 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. |
#5
| |||
| |||
|
|
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 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. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
In a Exceute SQL task: DECLARE @CmdStr nvarchar(1000) SET @CmdStr = 'copy file1.txt + file2.txt + file3.txt concatfile.txt' EXEC master..xp_cmdshell @CmdStr |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
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 - spools all three resultsets to 1 textfile on disk using the filesystemobject |
![]() |
| Thread Tools | |
| Display Modes | |
| |