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
 General SQL Server Forums
 New to SQL Server Programming
 runing bcp in t-sql in sql 2000

Author  Topic 

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-01-04 : 14:36:08
Hi, I have sql 2000 and i need to run this in t-sql

bcp mozaikDB.dbo.FileList in C:\myDev\sql\filelist.csv -t -c -Uusername -Sserver\instance

The script works well in cmd prompt.

2/also how do i run that script without mentioning the instance name. I want the user to be able to enter the instance name himself instead of that instance name being hard coded in the script.
Thanks a lot.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-01-04 : 15:06:05
You can run bcp.exe via xp_cmdshell.


Tara Kizer
Go to Top of Page

rtutus
Aged Yak Warrior

522 Posts

Posted - 2007-01-05 : 16:29:01
thanks a lot
Go to Top of Page
   

- Advertisement -