I'm trying to import some data from a data base table to a flat file. But I get a error message when I run BCP command in coomand line.
My bcp command is as follows.
C:\Documents and Settings\shamen>bcp databasename.tablename out -c-f flatfile.txt -T MSSQLSERVER
When I run this, I get " an error has occired when connecting to the server. This faillure may be caused by default SQL server does not allow remote connection.
Then I Changed it as follows.
C:\Documents and Settings\shamen>bcp databasename.tablename out flatfile.txt -T-c
Then I get " Unknow argument ' BCPfile.txt' on command line "
Does any tell me how to fix this
Thanks