From: Plamen Ratchev on
If you read the BOL extract I posted it says to use "":

bcp -q "dataBase Name.dbo.table" out PC.file -nT -S host\instance

--
Plamen Ratchev
http://www.SQLStudio.com
From: jtaylor on
Same error, I'm afraid.


On Oct 8, 12:09 pm, Plamen Ratchev <Pla...(a)SQLStudio.com> wrote:
> If you read the BOL extract I posted it says to use "":
>
> bcp -q "dataBase Name.dbo.table" out PC.file -nT -S host\instance
>
> --
> Plamen Ratchevhttp://www.SQLStudio.com

From: Erland Sommarskog on
jtaylor (jtaylor(a)lorencook.com) writes:
> On Oct 8, 12:09�pm, Plamen Ratchev <Pla...(a)SQLStudio.com> wrote:
>> If you read the BOL extract I posted it says to use "":
>>
>> bcp -q "dataBase Name.dbo.table" out PC.file -nT -S host\instance
>
> Same error, I'm afraid.

The quotes should be around the database name, not the entire specification.
I just ran this command successfully on my machine:

bcp "outer space".dbo.klafs out slask.bcp -q -T -n


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

From: Plamen Ratchev on
The problem was actually that the -q option was listed before the table. It is required to have the options after the
table. This should work fine:

bcp "dataBase Name.dbo.table" out PC.file -n -T -q -S host\instance

--
Plamen Ratchev
http://www.SQLStudio.com
From: jtaylor on
That works. Thanks!

On Oct 9, 4:11 pm, Plamen Ratchev <Pla...(a)SQLStudio.com> wrote:
> The problem was actually that the -q option was listed before the table. It is required to have the options after the
> table. This should work fine:
>
> bcp "dataBase Name.dbo.table" out PC.file -n -T -q -S host\instance
>
> --
> Plamen Ratchevhttp://www.SQLStudio.com