SQLCMD Basics

Example Usage: sqlcmd -S ComputerName\InstanceName -i MyScript.sql -o MyOutput.csv -t 1000 -W -s "," -X1 sqlcmd -S localhost\sqlsrv2012 -d AdventureWorks2012 -i C:\DataFiles\EmployeeQuery.sql -o C:\DataFiles\Employees.csv -t 1000 -W -s "," -X1 sqlcmd -S localhost\sqlsrv2012 -d AdventureWorks2012 -Q "SELECT FirstName, LastName FROM…

%d bloggers like this: