Skip to content
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

Semicolon (';') after the SQL statement leads to an error ORA-00933 #174

Closed
amochin opened this issue Jun 7, 2023 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@amochin
Copy link
Collaborator

amochin commented Jun 7, 2023

Reproducible at least with an Oracle database, when using the "Connect using custom params" keyword and the python oracledb module. See #173 for an example of connection details.

Running such a keyword:
Check If Exists In Database SELECT id FROM person WHERE first_name = 'Franz Allan';
leads to an error:
DatabaseError: ORA-00933: unexpected token at or near ;

Removing the semicolon after the statement makes the keyword work without any errors.
Check If Exists In Database SELECT id FROM person WHERE first_name = 'Franz Allan'

Even if it's somehow an expected error from the Oracle side (which I'm not sure about, need to check), I believe that the Database library should be tolerant enough to make such a simple command run properly.

@amochin amochin added the bug label Jun 7, 2023
@amochin amochin added this to the v1.3.0 milestone Jun 7, 2023
@amochin amochin self-assigned this Jun 21, 2023
@amochin
Copy link
Collaborator Author

amochin commented Jun 21, 2023

Fixed. The executed SQL statement will be now stripped before the execution - the trailing semicolon is removed.
Other databases seem to work OK if there is no semicolon in the end.

@amochin amochin closed this as completed Jun 21, 2023
amochin added a commit that referenced this issue Jul 11, 2023
…ed based on the DB module (True for Oracle only) and can be changed from outside - necessary for running some SQL scripts even in Oracle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant