Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing multiple queries #1347

Closed
cloud-rocket opened this issue Apr 17, 2024 · 1 comment
Closed

Executing multiple queries #1347

cloud-rocket opened this issue Apr 17, 2024 · 1 comment

Comments

@cloud-rocket
Copy link

Environment

  • Python: 3.11 64 bit
  • pyodbc:
  • OS: Windows
  • DB: Aspen IP21
  • driver: AspenTech SQLplus

Issue

Because Aspen IP21 is not fully compliant with MSSQL, there is no way to limit the amount of results without running 2 queries together:

SET MAX_ROWS 100;
SELECT SELECT NAME, TS, VALUE from HISTORY where NAME='abc';

Seems like cursor.execute only runs the 1st query, but not the second.

expected behavior: Return 100 rows as it happens in Aspen SQLPlus
observed behavior: Error returned

@v-chojas
Copy link
Contributor

Did you try cursor.nextset() ?

Repository owner locked and limited conversation to collaborators Apr 17, 2024
@gordthompson gordthompson converted this issue into discussion #1348 Apr 17, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants