You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import sqlglot.expressions as exp
query ="""
select col1, col2 into l_col1, l_col2
from table
where col1 > 10
for update
"""
expressions = sqlglot.parse_one(query, read='oracle')
x = list(expressions.find_all(exp.Table))
for i in x:
listTables = str(i).split(' ')[0]
print(listTables)
Note that above query is a valid oracle query.
query fails as it cannot process for update clause.
Request you to add support for the same.
Thanks ton in advance!
Thanks,
Sachin
The text was updated successfully, but these errors were encountered:
Hello Team,
Warm greetings!
Parser is unable to parse query when FOR UPDATE Clause is used.
Following query works fine in oracle-
This is used to lock the select query incase other session is trying to update the same data or column.
Oracle Documentation -
https://stackoverflow.com/questions/66247423/why-we-need-select-for-update-in-oracle-sql
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj31783.html
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj41360.html#rrefsqlj41360
Code for your reference -
Note that above query is a valid oracle query.
query fails as it cannot process for update clause.
Request you to add support for the same.
Thanks ton in advance!
Thanks,
Sachin
The text was updated successfully, but these errors were encountered: