Importing Data into SQL Server – Using Excel Shortcuts

I’ll be the first to say, the switch from DTS to SSIS was painful. DTS would go through a lot of implicit conversions so you didn’t have to worry or think about them. But SSIS was not as merciful. From different fields lengths to different encodings, SSIS wants you to be specific. Sometimes, it is just quicker to use some excel trickery than figuring out that you should have defined a column as a String 65 instead of the default String 50. We will use the CountryList.csv file and CountryList table from the original Importing Data in SQL Server post. … Continue reading Importing Data into SQL Server – Using Excel Shortcuts

Importing Data into SQL Server – Using the INSERT statement

Sometimes, the easiest and quickest way to get data into SQL Server is to simply use an INSERT statement.  Here is what the INSERT statement looks like in Books Online(BOL)

Ok, let stick to the basic and learn some quick insert techniques that you can use today. Recall that we are using the CountryList table, which we created in earlier examples. Here is the script to create the table:

The easiest INSERT statement goes something like this:

Here is a sample using the CountryList table:

Recall that the country table has an IDENTITY Column, so we … Continue reading Importing Data into SQL Server – Using the INSERT statement

Importing Data into SQL Server – Using the Import Export Wizard

Today begins the series on importing data into SQL Server 2005/2008 using the various built in tools. With SQL Server, there are several ways of getting your data from one place to another. Today, we will focus on using the wizard from SQL Server Management Studio. Before we begin, I am using a simple database called testdb. I am also using a country code file found at http://www.andrewpatton.com/countrylist.html. The file contains the 2 and 3 character ISO 3166 Country Code abbreviations, which we will use in our sample. The CSV file as seen in Excel 2007 Here is the script … Continue reading Importing Data into SQL Server – Using the Import Export Wizard