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 2005 Forums
 SSIS and Import/Export (2005)
 Adding an extra column to a text output

Author  Topic 

pareshmotiwala
Constraint Violating Yak Guru

323 Posts

Posted - 2009-01-27 : 09:45:47
Folks
I need to export data from a table to a text file but also add a column to the text file which as value "ABC" as the first column.
I need it urgently.
Could not use the Derived column.
Thanks
Paresh

Regards
Paresh Motiwala
Boston, USA

rgombina
Constraint Violating Yak Guru

319 Posts

Posted - 2009-01-27 : 11:29:41
select 'ABC',yourcol1,yourcol2.... works from SQL Task?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-27 : 11:35:24
use bcp to export to text file with query out option using above query

http://sqlblogcasts.com/blogs/madhivanan/archive/2007/08/27/bcp-export-data-to-text-file.aspx
Go to Top of Page
   

- Advertisement -