This post is a quick guide on how to export data from SQL Server into a CSV file. The default export to settings will try save your query as a column aligned .rpt file, so I’ll cover that below while converting to CSV format.
Backing up a database is something I’ve always found easier done within a query window. There’s not much to it; BACKUP DATABASE [DATABASENAME] TO DISK = N'e:\directory\databasename_backupdate.bak'
This script will delete rows within a table that are out-with the specified retention period. This can be useful if you’re running deletes on large tables, and particularly if;