bcp files

erez_zi

New member
bcp files

Hi, I have a bcp file and I want to fill a sql db table from the file. How can I do that (I guess from query analyzer) I tried the following:
bcp DBname..dbtable in "full path\filename.bcp" -Usa -n -P -E -T​
it gave me a syntax error
 

erez_zi

New member
not working

I have a table in a sql db consisting of int fields. One of them is an ID field. I´m creating a bcp file using:
bcp DBname..tblName out "file.BCP: -Usa -n -P -E -T​
When trying to open the file into a table:
bcp DBname..tblName in "file.BCP" -Usa -n -P -E -T​
I get the error: SQLState = 37000, NativeError = 170 Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ´/´. WHHHHHHHYYYYYYYYYYY
 

erez_zi

New member
solved

the problem was that the table had a field which its name contained the char ´/´. Take this into notice when naming fields
 
למעלה