About 235,000 results
Open links in new tab
  1. Export table to file with column headers (column names) using the …

    Aug 31, 2009 · This method automatically outputs column names with your row data using BCP. The script writes one file for the column headers (read from …

  2. How to write using BCP to a remote SQL Server? - Stack Overflow

    Mar 9, 2017 · This option is required when a bcp command is run from a remote computer on the network or a local named instance. To connect to the default instance of SQL Server on a …

  3. sql - How to use BCP command to export data to excel with …

    Feb 3, 2017 · Here's a to the source on GitHub for a command-line tool I wrote to export a query result to a new Excel document file (with xslx extension - not a tab-delimited text file …

  4. sql server - Where Is Microsoft Command Line Utilities 16

    Mar 9, 2023 · The Problem When you install this you will get version 15 of bcp and sqlcmd. When you install SQL Server 2022 directly, you will get version 16 of the same tools. Just as a side …

  5. sql server - how to export sql data to csv using bcp - Stack Overflow

    Jun 17, 2017 · how to export sql data to csv using bcp Asked 8 years, 5 months ago Modified 1 year, 6 months ago Viewed 56k times

  6. Can I specify an input sql file with bcp? - Stack Overflow

    May 13, 2012 · Ex: bcp "SELECT Name FROM AdventureWorks.Sales.Currency" queryout Currency.Name.dat -T -c According to its reference the "-i" option: Specifies the name of a …

  7. sql server - bcp command not working - Stack Overflow

    Mar 27, 2013 · BCP is for the C prompt not for SQL Server Management Studio. To run it inside SSMS you need to use xp_cmdshell (and be logged as a user with rights to get to xp_cmdshell).

  8. sql server - How do I solve a BCP utility error when importing a …

    Jun 26, 2025 · My input files are on my local drive c:/, and I use Trusted Windows authentication to SQL Server. All bcp discussions are quote old, I have a feeling that it has been replaced …

  9. sql server - Running a SQL Query using BCP - Stack Overflow

    Jun 1, 2018 · I just started learning to use SQL Server's BCP and I'm using it to query a SQL Server DB and create a .csv file. I can create the file with no problem using this command: bcp …

  10. t sql - Exporting all tables into files from SQL Server database …

    Jan 9, 2014 · 0 Default setting is that you can't execute bcp command from SQL server. This version works from DOS, Powershell and BAT file. I didn't find setting from BCP which would …