pyodbc icon indicating copy to clipboard operation
pyodbc copied to clipboard

Expose sql_type for columns in resultset #167

Open jstastny-cz opened this issue 8 years ago • 4 comments

jstastny-cz avatar Dec 17 '16 12:12 jstastny-cz

@jstastny-cz This looks clean, but I'm wary about adding something to the interface without knowing what someone would do with it. I'm not sure how one would make use of this information. What was the use case for this? Thanks.

mkleehammer avatar May 14 '18 01:05 mkleehammer

@mkleehammer Hello, we used pyodbc for ODBC interface/driver tests. What we needed to do was to check the actual SQL data type returned by the driver.

jstastny-cz avatar May 14 '18 07:05 jstastny-cz

If I understand the PR correctly, then we have the same use case. I am using pyodbc to generate SQL Server create tables DDL based on the result set. If the actual SQL type is returned, we can create exact DDL. Right now we are creating approximate DDL.

matthias-github avatar Mar 30 '19 04:03 matthias-github

Yes please! We have a use case that requires us to know the actual SQL type behind the column. We have been unable to come up with a clean workaround.

celestialorb avatar Aug 29 '19 14:08 celestialorb