Where's Nathan?

It has been quite a while since I've last updated this blog. It doesn't mean that I have stopped writing, just that I've been writing other places. For SEO, I will mostly continue to post articles on the Live Search Webmaster blog, for developer related content (and O'Reilly Found conference information) will continue to post on Jane and Robot, and finally for financial insight I'll be writing on Meridian Pacific Investments blog.

I've been really busy lately with Microsoft and the O'Reilly conference, but I still have a few additional side projects that I'll be introducing in the next couple months. Stay tuned. Here's a few of the articles I've published recently:

I will continue to update this blog as time permits, but I don't write very much that isn't finance or SEO related these days. Hopefully as I dig deeper into some of my other projects I'll have something useful to write.

Posted on December 7, 2008

Web 2.0 Expo: Advanced SEO for Developers

I would like to thank everyone for taking the time to check out my session at Web 2.0 Expo here in New York City. I've posted my presentation and answers to all the online questions on the Webmaster Center Blog at Live Search.

Posted on September 17, 2008

Import a CSV File into SQL Server

Metrics aggregation and reporting have always seemed to be a part of every job I've had. Over the years I've developed a system that allows me to slice and dice just about anything using Excel, SQL and a little bit of code. I used to rely heavily on the Data Transformation Services in SQL 2000 Enterprise Console, and haven't really found a good replacement (read: free replacement) until today. I just came across this little snippet of SQL that does the trick very well, here's what you do:

1. Create a new table in your database

Create a new table in your database, making sure each column data type is compatible with the corresponding column in your CSV file.

image

2. Properly format your input CSV file

What every data you want to suck in should be in a standard CSV file format as such. Save the file in a conspicuous location like c:\.

image 

3. Run this script

Finally, execute the following script on your SQL Server. It should locate the CSV file, and import all the rows. Note, if it encounters an error on any single row, it will simply exclude that row in the resulting table. That could be a bit of a problem if you've got a lot of data.

image

This script seems to work in SQL Server 2005 and 2008. For more information, check out MSDN's reference material, there seem to be a lot more bells and whistles than I'm using here in this simple example. http://msdn.microsoft.com/en-us/library/ms188365.aspx

Posted on September 3, 2008