i'm trying to execute this type of sql command with python but that doesn't work
import pymssql
_conn = pymssql.connect(** SQL parameter)
_cur = _conn.cursor()
_cur.execute("EXEC(SELECT * something)")
i got this error.
i'm trying to execute this type of sql command with python but that doesn't work
import pymssql
_conn = pymssql.connect(** SQL parameter)
_cur = _conn.cursor()
_cur.execute("EXEC(SELECT * something)")
i got this error.
The EXECUTE command takes a string, not plain SQL commands:
EXEC('SELECT * something')
But I'm not sure why you're doing this, you could just pass the SELECT statement directly.