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)
 Appending rows to a text file using a stored procedure.

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-01-03 : 11:31:16
Pat&t writes "How can I append more rows to an already existing Text File which was created using a bulk copy command.

Also why am i not able to export data from a temp table e.g #table, to a text file. How do I do it ?

Thanx in anticipation."

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2003-01-03 : 11:58:59
you can bulk copy to another file and then use
DOS copy command through a call to xp_cmdshell
to concatenate the two files

COPY /A file1 /A + file2 combinedfilename /A /V


Regarding getting #temptable to file.

Take a look at the following two examples:

http://www.sqlteam.com/item.asp?ItemID=744
http://www.sqlteam.com/item.asp?ItemID=4722




Edited by - ValterBorges on 01/03/2003 12:01:41
Go to Top of Page
   

- Advertisement -