Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS Export with First row as column heading

Author  Topic 

petek
Posting Yak Master

192 Posts

Posted - 2008-09-04 : 04:20:44
Hi all,

Firstly thanks for looking at this post.

I am trying to export data using DTS, works fine however the column heading are not displayed.

I am executing the DTS package from a sp:

declare
@cmd nvarchar(1000),
@servername nvarchar(20)
set @servername=@@servername

set @cmd='DTSRun /S "(local)" /N "ExportData" /G "{AEF4F726-0D20-44B9-80B5-F2AA9A5D96D1}" /L "C:\Program Files\ra\Documents\Rights\LogFile.txt" /W "-1" /E '

--some code???????

exec master..xp_cmdshell @cmd, no_output

How do i display the column names in the first row

Kind Regards

Pete.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 04:24:48
you've an option in dts package to specify to include column headers (its a checkbox inside the transform data properties).
Go to Top of Page

petek
Posting Yak Master

192 Posts

Posted - 2008-09-04 : 04:31:38
As normal thanks for your prompt reply and your help.

Cheers mate!!

Kind Regards

Pete.
Go to Top of Page

petek
Posting Yak Master

192 Posts

Posted - 2008-09-04 : 04:43:19
one last thing i promise
i'm not sure if i asked this before but my package runs with the database it was created on is there a way to use the dts with other databases? instead of just locally

Kind Regards

Pete.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 05:09:03
quote:
Originally posted by petek

one last thing i promise
i'm not sure if i asked this before but my package runs with the database it was created on is there a way to use the dts with other databases? instead of just locally

Kind Regards

Pete.


didnt understand what you mean. dts makes use of defined connection managers inside to decide which db it should connect to and retrieve the data or perform operation specified.does that answer your question?
Go to Top of Page

petek
Posting Yak Master

192 Posts

Posted - 2008-09-04 : 05:48:38
I have another database and i want to call the dts package from a stored procedure in that db can this be done?

Kind Regards

Pete.
Go to Top of Page
   

- Advertisement -