Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BCP with space in path name

Status
Not open for further replies.

medir01

Programmer
Aug 8, 2002
7
0
0
US
I am trying to BCP a file into SQL Server that is in a directory that contains a space in the name.
I have tried using the 8 character name and quotes around the path name and I get the following:

L:\>bcp db..tblname in '"\\server\Sfa_mis\Phase three\Projects\Commissions\CIMBSFiles\Incoming\Test\RTMS\mtcbrex1"' -Uxx -Pxx -Sxx -f fmt\rtms.fmt

SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Unable to open BCP host data-file

The file is there and accessible.
It seems to have a problem with the 'Phase Three' directory. There doesn't seem to be a valid 8 character name for it.
Is there an option I have not tried yet.

Thanks
 
Have you tried enclosing the Phase three in brackets. I recall this from some BCP documentation

\\server\Sfa_mis\[Phase three]\Projects\Commissions\CIMBSFiles\Incoming\Test\RTMS\mtcbrex1


Hope this helps!
je4ddntm
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top