Copying selected rows using BCP.

  • Hi All,

    Can we copy selected rows ( I mean using where clause kind of... ) from a table using BCP utility ?

    If it is possible, can any one help me to provide the syntax for the same

    Thanks in advance,

    Subhash

  • Hello!

    Yes, of course you can!

    Example: bcp "SELECT * FROM Northwind.dbo.Products WHERE UnitsInStock <= 10 " queryout myOutFile.DAT -T -SmyDBServer -n

    Happy computing!

    Hanslindgren

  • Thanks Hanslindgren

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply