Original source code from PyPi.
Fix whitespace.
Fix exception when column headers contain spaces.

Column names with spaces need to be wrapped in [] to be valid SQL.