BCP Utility

BCP Utility

Post by Ari » Thu, 18 Oct 2001 18:38:19



Hi
Can I use BCP for upending a table to a flat file?
The first rows of the file use as the header and I don't want to lose
them when I copy the table to the file. Is it possible?
 
 
 

BCP Utility

Post by Rand Bo » Sat, 20 Oct 2001 03:57:54


Arik,

If you mean can you append a table to an existing text file the answer is
no. However, you can export to a text file and then use the copy command to
add two files together.

copy file1+file2 file3

Rand Boyd
Microsoft SQL Server Support

Please reply only to the newsgroups.
When posting, please state the version of SQL Server being used and the
error number/exact error  message text received, if any.

I've been "encouraged" to share this helpful information from our lawyers.
This posting is  provided "AS IS" with no warranties, and confers no
rights. You assume all risk for your use.
? 2001 Microsoft Corporation. All rights reserved.

 
 
 

1. bcp utility

Is there a SQL Server function that duplicates the
functionality of the bcp command prompt utility?  I'm
trying to output a query using a format file and continue
to get syntax errors.  Is this because it is not
compatible within a stored procedure?  It works fine
through the command prompt.

The statement I'm using looks like this:
bcp "select a, b, c, d from table"
queryout "outputfile.txt" -f"formatfile.fmt"

In the stored procedure, I am setting the above statement
to a variable then calling Exec(variable).

Please Help!!  Thanks!

2. LOCAL: SF Bay Area BALUG - Tue 10/20/1998 at 7:00 PM

3. isql and bcp utility

4. Sorting listboxes

5. bcp utility

6. CDML and html frames MW

7. How to make a recordset = contents of Array?

8. Debugging BCP utility

9. BCP utility error

10. BCP utilities

11. reading remote file using bcp utilities

12. BCP utility