Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting the "Valid table name is required for in, out or format" error with BCP?

I want to import a table while keeping the identity column.

In cmd, I enter:

bcp database.edg.Hello in C:\Users\Tech\Downloads\p.csv -c -E 
       -S 349024ijfpok.windows.net\MSSQLSERVER -T

Which returns:

A valid table name is required for in, out or format options

Is this an issue with the syntax?

like image 534
user5112255 Avatar asked Jul 14 '15 15:07

user5112255


1 Answers

You need brackets for database information. I usually use colon " for path as well just to be sure. Complete command:

bcp [database].[edg].[Hello] in "C:\Users\Tech\Downloads\p.csv" -c -E 
       -S 349024ijfpok.windows.net\MSSQLSERVER -T
like image 75
Ogglas Avatar answered Jan 02 '23 21:01

Ogglas