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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-03-26 : 07:32:56
|
| ahmed writes "HiWhen im trying to use BCP below exampleDECLARE @FileName varchar(50), @bcpCommand varchar(2000)SET @FileName = REPLACE('c:\authors_'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-')SET @bcpCommand = 'bcp "SELECT * FROM pubs..authors ORDER BY au_lname" queryout "'SET @bcpCommand = @bcpCommand + @FileName + '" -U garth -P pw -c'EXEC master..xp_cmdshell @bcpCommandi got the following output'bcp' is not recognized as an internal or external command,operable program or batch file.NULL" |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2003-03-26 : 07:56:02
|
| c:\authors_03-26-03.txtbcp "SELECT * FROM pubs..authors ORDER BY au_lname" queryout "c:\authors_03-26-03.txt" -U sa -P fair -cYour code works perfectly for me.Are you able to run bcp directly in the command prompt?Sekar~~~~Success is not a destination that you ever reach. Success is the quality of your journey. |
 |
|
|
|
|
|