March 15, 2011 at 9:03 am
Good morning-
I'm trying to create a non-XML (character) format file for import. Here is the command I'm running from the command line:
c:\bcp "data_base.dbo.table" format nul -c -f filename.fmt -S"server\instance" -T
I'm getting "Syntax error in 'format'
Anyone able to help? I've checked BOL and Google but I'm still running into problems. I've checked with our DBAs and they tell me remote connections are enabled. We use Windows authentication.
Thanks in advance...
Jason
March 15, 2011 at 9:30 am
1. I don't think that you need to use the double-quotes around the 3-part db.schema.object unless it contains a space or quotation mark; then you would also need to use the -q flag.
2. I don't think you need the "null" after "format".
I just ran bcp to create a format file without the quotes around the 3-part object name, and without the null, and it was created properly in the specified format file.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 15, 2011 at 9:33 am
Thanks, I was emclosing in quotes due to the "_" in the database name. One of our DBAs was able to create the file for me. Thaks for the reply though, I learned something...
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply