
Loading CSV Into SQL Server With BULK INSERT Correctly
Load a CSV into SQL Server with BULK INSERT: FORMAT CSV for quoted fields, FIRSTROW, UTF-8, error files, server paths and permissions.
Everything you need to level up your coding skills.

Load a CSV into SQL Server with BULK INSERT: FORMAT CSV for quoted fields, FIRSTROW, UTF-8, error files, server paths and permissions.

How to export a SQL Server query to a real CSV with bcp: add the header row, quote fields yourself, fix dates and NULLs, and pick the right encoding.

Turn SQL Server rows into JSON with FOR JSON PATH and AUTO, nest child rows, control nulls and wrappers, and avoid the double-encoding trap with JSON_QUERY.

How OPENJSON turns a JSON array or object into rows in SQL Server, with the default key, value and type columns, the WITH clause, nested arrays and the traps.

How SQL Server, Oracle, Snowflake and BigQuery store, read, unpack, build and index JSON, side by side, with the null, type and size traps in each.

An exported date shows as 45292 because Excel stores dates as numbers and the cell has no date format. See the cause, the code fix and a file repair.

Stop repair prompts, garbled accents and wrong columns when exports open in Excel: legal characters, sheet names, time zones, NaN, BOM and separators.

Build a job that queries a database, writes an Excel file and emails it on a schedule with smtplib and cron, with safe credentials and failure alerts.

Freeze the header row, add filter buttons and set column widths from Python with openpyxl and XlsxWriter, including an auto-width helper and print settings.

Write Excel formulas and number formats from Python with openpyxl and XlsxWriter: English syntax, cached values, table references, percent and date codes.

Build one Excel workbook from several SQL queries: a summary sheet, a sheet per region, formulas that point across sheets and an index with working links.

Export a MySQL query to a clean XLSX with PyMySQL and pandas, handling DECIMAL, zero dates, tinyint flags and utf8mb4, and compare it with Workbench.
We send one email when a new article is published. No spam.