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 |
muhiar
Starting Member
37 Posts |
Posted - 2006-05-01 : 04:14:23
|
hi alli have an urgent problemwhat i am trying to do is to export the data from sql server table into text filethis export need to be scheduled for each hourthe problem is that i want data in the file to be seperated by <CR><LF> so does DTS enable us to change the column sperator??and how? it does support for only comma , semicolon ,tab , vertical bari have tried to use bcp with format file but i always get the same errorbcp is not recognized as internal or external commandalthough it worked perfectly from the command prompt as well as i have inserted the path of bcp.exe in the system path envrionment variable and checked the command promptin the bcp i tried to add the path of bcp.exe but it does not work??what shall i do?any ideas??plz it is sooooooooooooooo urgent case |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-01 : 05:54:54
|
you can execute BCP from T-SQL via the xp_cmdshell KH |
 |
|
muhiar
Starting Member
37 Posts |
Posted - 2006-05-01 : 06:02:08
|
i have created a stored procedure that uses the master..xp_cmdshell command but it does not work |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-01 : 07:54:40
|
What is the error that you encountered ? KH |
 |
|
muhiar
Starting Member
37 Posts |
Posted - 2006-05-01 : 09:47:05
|
bcp is not recognized as internal or external command |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-05-01 : 10:05:37
|
Check that the PATH includes the folder where BCP.EXE is located?Kristen |
 |
|
muhiar
Starting Member
37 Posts |
Posted - 2006-05-02 : 01:34:42
|
i have included the bcp.exe path in the PATH system environment variables |
 |
|
muhiar
Starting Member
37 Posts |
Posted - 2006-05-02 : 01:35:50
|
but it did not work and i have used the path in the master..xp_cmdshell 'c:\path\bcp.exe' and this did not work |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-05-02 : 04:13:47
|
Are you still getting "bcp is not recognized as internal or external command" or a different error now?Kristen |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-05-02 : 04:28:44
|
quote: Originally posted by muhiar but it did not work and i have used the path in the master..xp_cmdshell 'c:\path\bcp.exe' and this did not work
This does not looks like the normal installation path. Did you just copied BCP.exe from somewhere into C:\path ? KH |
 |
|
|
|
|