title: Python / pypyODBC: Row Insert Using String and NULLs
body: <p>I am pretty new to Python and have not really interacted with SQL Server and XML Parsing until this current project (might not even the best approach to take).  Long story short, my IT team is very back-logged and I need to get data into a sandbox table (parsed from an XML).</p>
  
  <p>There is a segment of the XML that contains attributes [xx]001 to [xx]025.  Not all of these attributes are included for each XML I will be parsing. Therefore, I iterate through a loop of all the possible attributes and append the results to a list.  Since not all attributes are in each XML, I can incur noneTypes by trying to represent each one.  Not an issue until a get to creating my SQL insert statement where I need them converted to NULLs.  There is probably some very simple way to handle this, but my newbie status is impeding my progress.  Relevant pieces of the code follow... </p>
  
  <p>Maybe there is a better way to do it in general?  I am concerned that sqlList might only be able to get so large before I hit a limit as well.</p>
  
  <pre><code>#this list contains Nones
  sqlList = (", ".join(map(repr,appendedList)))
  
  #the Nones are an issue when I get to here
  curs.execute("USE Sandbox INSERT INTO myTable VALUES (%s)" % (sqlList))
  curs.commit()
  </code></pre>
  
  <p>Here is an example of what sqlList looks like:</p>
  
  <pre><code>'20_2014', '20_2014_3/25/2015 2:01 PM', 'FBR', 'A', '0', '0', '3', '1', '134', None, None, '0', None, '0', '0', '0', '0', '0', None, None, '2', None, None, None, None
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>pypyodbc.ProgrammingError: ('42S22', "[42S22] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'None'.")
  </code></pre>