Created
March 17, 2014 17:43
-
-
Save lordjc/9604421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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