grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

CHR-Function cannot used in TRIM-Function

Open paddi35 opened this issue 3 years ago • 2 comments

  • [ ] using Functions (e. g. CHR()) in TRIM does not work correct
  • [ ] MULTISET Operators does not work
  • [ ] FORALL does not work correct

CHR-function in TRIM-function

trim(chr(10) from foobar)

https://github.com/antlr/grammars-v4/blob/79c484ff09076f3df9737acd569467b14c17eec2/sql/plsql/PlSqlParser.g4#L3890


MULTISET Operators

SELECT      customer_id, cust_address_ntab
MULTISET UNION cust_address2_ntab multiset_union
FROM       customers_demo;

There are MULTISET EXCEPT, MULTISET INTERSECT and MULTISET UNION as Multiset Operators.


FORALL Instead of

FORALL index_name IN bounds_clause sql_statement (SAVE EXCEPTIONS)?

should be this

FORALL index_name IN bounds_clause (SAVE EXCEPTIONS)? sql_statement

https://github.com/antlr/grammars-v4/blob/79c484ff09076f3df9737acd569467b14c17eec2/sql/plsql/PlSqlParser.g4#L3107

paddi35 avatar Feb 01 '22 20:02 paddi35

Could you please submit a pull request?

KvanTTT avatar Feb 02 '22 11:02 KvanTTT

CHR-function in TRIM-function

for TRIM, the oracle docs here say

Both trim_character and trim_source can be VARCHAR2 or any data type that can be implicitly converted to VARCHAR2.

so the quoted string here should just become something more general.

MULTISET Operators

not implemented in this grammar, they can get put into the relational_operator rule

Commodore68 avatar Sep 03 '22 20:09 Commodore68