Skip to content

Instantly share code, notes, and snippets.

@lordjc
Created March 17, 2014 17:43
Show Gist options
  • Save lordjc/9604421 to your computer and use it in GitHub Desktop.
Save lordjc/9604421 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
#
#pip install https://pyodbc.googlecode.com/files/pyodbc-2.1.11.zip
#Install the microsoft odbc driver for linux available here:
#http://www.microsoft.com/en-us/download/details.aspx?id=28160
import pyodbc
cnxn = pyodbc.connect('DRIVER=SQL Server Native Client 11.0;SERVER=<ip>;UID=<username>;PWD=<password>')
cursor = cnxn.cursor()
for row in cursor.columns(table='YSD_OPENORD_EMAIL'):
print row.column_name + ',',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment