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)
 bcp question

Author  Topic 

cbeganesh
Posting Yak Master

105 Posts

Posted - 2009-01-22 : 13:49:45
im creating a file using bcp. The file name should be name1.bil.090122
The problem is bcp creates file with name name1.bill. the 090122 is missing from the file name. 090122 goes to the type of the file.
is there any way i can have name1.bil.090122 in the file name

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-22 : 15:45:41
It worked fine for me. Here is what I used:
bcp db1.dbo.table1 out c:\name1.bill.090122 -c -Sserver1\instance1 -T -t, -r\r\n

Show us your code.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2009-01-22 : 15:55:41
you might want to add the missing bit in the bcp statement as a variable. It will make your bcp statement dynamic unless it already is. Post the bcp bit from your code if you need more clarity on this.
Go to Top of Page
   

- Advertisement -