I'm using pypyodbc to connect to the SQL Server. I want to store my resultset into a temporary table like we do in SQL. But everytime I try to do it - I get this error message:
pypyodbc.ProgrammingError: ('24000', '[24000] [Microsoft][ODBC SQL Server Driver]Invalid cursor state')
This is what I'm trying to query:
querytest = "SELECT id into #temp from Team"
cursor1.execute(querytest);
var = cursor1.fetchall()
print(var[:10])