We often import CSV into SQL Server, but how do you export data as CSV with SQLCMD? Two simple commands, one with column headers and one without.
Sharing Query Results From SSMS: Copy With Headers, Grids and CSV
Share SSMS results with copy with headers, text and file output, deliberate CSV quoting, and command-line exports for larger sets.
Loading a CSV Whose Columns Do Not Match the Table
Your supplier’s CSV has an extra column and a different order. Here is how to load it safely, with a header check and a staging table.
Querying External Files With PolyBase
PolyBase and SQL Server external tables expose CSV and Parquet files through schemas, while query plans show whether filters reduce remote work.
Moving Data Out of SQL Server in Open Formats
Move SQL Server data into open formats such as CSV, JSON, and Parquet while preserving types, NULLs, encoding, and readable files.
Reading Fixed-Width Text Files With OPENROWSET and a Format File
Read fixed-width text files with OPENROWSET and an XML format file, trim fields, validate conversions, and load only acceptable rows.
Importing CSV Files Without Surprises
Importing CSV files Without Surprises covers quoted delimiters, UTF-8 encoding, dates, staging tables, and SQL Server BULK INSERT FORMAT = ‘CSV’.






