Paging in MS SQL
This is by far the best explanation I've seen of how to do Paging in MS SQL:
http://www.thepcspy.com/read/paging_in_sql
When you have to query a very large table, you can't just call "select * from largeTable;". Doing so loads the entire table into memory. And unless you're on a very big machine, that's going to cause problems. Paging allows us to get around this by only asking for subsets of a large table. Wrapped in a for loop, you can easily make your way through a very large table using only a small amount of memory.
Extracting Binary Columns from MS SQL Server
Here's a quick ruby script to extract binary columns from an MS SQL server. In one column, I have the "Content" of the file stored in binary. In another column, I have the "Filename" which I used to write out the binary content.
more...
