Skip to content

SQL: read_sql with a stored procedure  #8105

Closed
@httassadar

Description

@httassadar

pandas 0.14.0

pandas.io.sql.read_sql(sql,dbconn) does not work if the string sql does not have 'select' in it. If I'm reading a sproc, sql will start with 'exec' and no 'select'.

There is a test on line 377 in pandas\io\sql.py
if 'select' in sql.lower()

I modified it to
if 'select' in sql.lower() or 'exec' in sql.lower()

then it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions