Skip to content

Using PERCENT as a Table column name causes a ParseException #128

@npiguet

Description

@npiguet

I'm using Oracle, where PERCENT is not a keyword and each time I try to parse a SELECT query that contains a reference to a column named percent the parser fails with a parse exception.

Here is an example query that fails to parse:

SELECT PERCENT "percent" FROM MY_TABLE;
cause : Encountered " "PERCENT" "PERCENT "" at line 1, column 8.
Was expecting one of:
    "ALL" ...
    "TOP" ...
    "DISTINCT" ...
    "*" ...
    "ALL" ...
    "DISTINCT" ...
    "TOP" ...
    "*" ...

By the looks of it, the fix for this seems to be to add <K_PERCENT> to the list of tokens in RelObjectName().

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions