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
 SQL Server Development (2000)
 output file/xp_cmdshell

Author  Topic 

ASALT
Starting Member

8 Posts

Posted - 2001-01-25 : 11:03:36
Need your invaluable help again.... SQL 6.5 I am trying to bcp a table to a file whose name was concocted in a previous stored proc and passed as a parameter to the stored proc that does the bcp.
The filename is made up of a reference field and a date
e.g. B1234ABC_010125.txt

I do the following:-

CREATE PROCEDURE sp_mt202_bcp (@appr_id int, @swift_filename char(19)) AS

blah, blah, blah
THEN

EXEC master..xp_cmdshell "bcp cbfllc_live..mt202_export out @swift_filename /c /t, /r \n -SADSNT -Usa -P" no_output

It bcp's the table out to a file called @swift_filename which is not what I want.
Thanks for any help.


   

- Advertisement -