Fixing issue with sample/head queries in mssql.

mssql uses 'select top N...' whereas others use 'select ... limit N' so errors were getting thrown when using head (for example).
This fixes it. Also changed to use `format` vs. '%'.

I think is my last pull request for awhile. :)  

Thanks for this module. I'm finding it very useful.