SQL Homework – August 2019 – Getting the data out

Leave a comment

August 5, 2019 by Kenneth Fisher

Everything else aside two of the most important tasks of a database are to get data in, and get data back out again. This month let’s practice getting that data back out. Try out at least 3 of the following by exporting one of your test tables into a CSV file (or some other format if you prefer).

  • BCP – A command line tool used to import and export data. Great for automation.
  • Import/Export wizard – Creates an SSIS package that can import or export data. This can be used as a one time import/export or the package can be saved for later use/editing.
  • SSIS – Create your own SSIS package manually. This is more work than using the wizard but you have an amazing amount of control. This is also great for automation.
  • Save or copy and paste the data from the output in SSMS. – This is a nice quick and dirty way to grab data.
  • Powershell – PoSH can do anything. Really. I’ve used it to wash my dishes on a couple of occasions. Create a script to get the data from a table and export it. Another great tool for automation.
  • The coding language of your choice. – Same as Powershell really. If you have some development background, pick a language and write yourself a script to export a table.
  • Other methods – Any other methods you can think of.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 3,755 other subscribers

Follow me on Twitter

ToadWorld Pro of the Month November 2013
%d bloggers like this: