[plsql] Fixed issue with missing optional table alias in MERGE usage (#5121)

Merge pull request #5121 from duursma:merge-fix
This commit is contained in:
Andreas Dangel
2024-07-19 16:23:36 +02:00
4 changed files with 232 additions and 29 deletions

View File

@ -57,6 +57,7 @@ This is a {{ site.pmd.release_type }} release.
* [#5107](https://github.com/pmd/pmd/pull/5107): \[doc] Update maven.md - Typo fixed for maven target - [karthikaiyasamy](https://github.com/karthikaiyasamy) (@karthikaiyasamy) * [#5107](https://github.com/pmd/pmd/pull/5107): \[doc] Update maven.md - Typo fixed for maven target - [karthikaiyasamy](https://github.com/karthikaiyasamy) (@karthikaiyasamy)
* [#5109](https://github.com/pmd/pmd/pull/5109): \[java] Exclude constructor with lombok.Builder for MissingStaticMethodInNonInstantiatableClass - [Krzysztof Debski](https://github.com/kdebski85) (@kdebski85) * [#5109](https://github.com/pmd/pmd/pull/5109): \[java] Exclude constructor with lombok.Builder for MissingStaticMethodInNonInstantiatableClass - [Krzysztof Debski](https://github.com/kdebski85) (@kdebski85)
* [#5118](https://github.com/pmd/pmd/pull/5118): \[java] FP for UnusedPrivateMethod with Jakarta @<!-- -->PostConstruct/PreDestroy annotations - [Krzysztof Debski](https://github.com/kdebski85) (@kdebski85) * [#5118](https://github.com/pmd/pmd/pull/5118): \[java] FP for UnusedPrivateMethod with Jakarta @<!-- -->PostConstruct/PreDestroy annotations - [Krzysztof Debski](https://github.com/kdebski85) (@kdebski85)
* [#5121](https://github.com/pmd/pmd/pull/5121): \[plsql] Fixed issue with missing optional table alias in MERGE usage - [Arjen Duursma](https://github.com/duursma) (@duursma)
{% endtocmaker %} {% endtocmaker %}

View File

@ -2713,7 +2713,7 @@ ASTDeleteStatement DeleteStatement() :
ASTMergeStatement MergeStatement() : ASTMergeStatement MergeStatement() :
{} {}
{ {
<MERGE> <INTO> [ LOOKAHEAD(2) SchemaName() "." ] TableName() [ TableAlias() ] <MERGE> <INTO> [ LOOKAHEAD(2) SchemaName() "." ] TableName() [ LOOKAHEAD(1, ID(), { getToken(1).kind != USING } ) TableAlias() ]
<USING> <USING>
( (
LOOKAHEAD(3) "(" ValuesClause() ")" LOOKAHEAD(3) "(" ValuesClause() ")"

View File

@ -13,5 +13,25 @@ BEGIN
THEN UPDATE SET b.text = e.text THEN UPDATE SET b.text = e.text
WHEN NOT MATCHED WHEN NOT MATCHED
THEN INSERT (ID,KEY1, TEXT,LCE_ID) values (JHS_SEQ.NEXTVAL,'PROM_EDIT_PROM_NR','Edycja promocji nr',123123); THEN INSERT (ID,KEY1, TEXT,LCE_ID) values (JHS_SEQ.NEXTVAL,'PROM_EDIT_PROM_NR','Edycja promocji nr',123123);
-- Missing alias
MERGE INTO b
USING ( SELECT 'PROM_EDIT_PROM_NR' key1,'Edycja promocji nr' text,123123 lce_id FROM dual ) e
ON (b.key1 = e.key1 and b.lce_id=e.lce_id)
WHEN MATCHED
THEN UPDATE SET b.text = e.text
WHEN NOT MATCHED
THEN INSERT (ID,KEY1, TEXT,LCE_ID) values (JHS_SEQ.NEXTVAL,'PROM_EDIT_PROM_NR','Edycja promocji nr',123123);
-- Both aliases missing
MERGE INTO b
USING e
ON (b.key1 = e.key1 and b.lce_id=e.lce_id)
WHEN MATCHED
THEN UPDATE SET b.text = e.text
WHEN NOT MATCHED
THEN INSERT (ID,KEY1, TEXT,LCE_ID) values (JHS_SEQ.NEXTVAL,'PROM_EDIT_PROM_NR','Edycja promocji nr',123123);
END; END;
/ /

View File

@ -1,38 +1,220 @@
+- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0] +- Input[@CanonicalImage = null, @ExcludedLinesCount = 0, @ExcludedRangesCount = 0]
+- Global[@CanonicalImage = null] +- Global[@CanonicalImage = null]
+- Block[@CanonicalImage = null] +- Block[@CanonicalImage = null]
+- Statement[@CanonicalImage = null]
| +- UnlabelledStatement[@CanonicalImage = null]
| +- MergeStatement[@CanonicalImage = null]
| +- TableName[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"]
| | +- ID[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"]
| +- TableAlias[@CanonicalImage = "B", @Image = "b"]
| | +- ID[@CanonicalImage = "B", @Image = "b"]
| +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false]
| | +- SelectList[@CanonicalImage = null]
| | | +- SqlExpression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"]
| | | +- ColumnAlias[@CanonicalImage = "KEY1", @Image = "key1"]
| | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- SqlExpression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"]
| | | +- ColumnAlias[@CanonicalImage = "TEXT", @Image = "text"]
| | | | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| | | +- SqlExpression[@CanonicalImage = "123123", @Image = "123123"]
| | | | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "123123", @Image = "123123"]
| | | | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"]
| | | +- ColumnAlias[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- FromClause[@CanonicalImage = null]
| | +- TableReference[@CanonicalImage = null]
| | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"]
| | +- ID[@CanonicalImage = "DUAL", @Image = "dual"]
| +- TableAlias[@CanonicalImage = "E", @Image = "e"]
| | +- ID[@CanonicalImage = "E", @Image = "e"]
| +- Condition[@CanonicalImage = null]
| | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"]
| | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="]
| | | +- SqlExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"]
| | | | +- PrimaryPrefix[@CanonicalImage = "B.KEY1", @Image = "b.key1", @SelfModifier = false]
| | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"]
| | | | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"]
| | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"]
| | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false]
| | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"]
| | | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | +- Condition[@CanonicalImage = null]
| | +- CompoundCondition[@CanonicalImage = null, @Type = null]
| | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="]
| | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"]
| | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false]
| | | +- SimpleExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"]
| | | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"]
| | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"]
| | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| +- MergeUpdateClause[@CanonicalImage = null]
| | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | +- Column[@CanonicalImage = "TEXT", @Image = "text"]
| | | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"]
| | +- PrimaryPrefix[@CanonicalImage = "E.TEXT", @Image = "e.text", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "E.TEXT", @Image = "e.text"]
| | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | +- Column[@CanonicalImage = "TEXT", @Image = "text"]
| | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| +- MergeInsertClause[@CanonicalImage = null]
| +- Column[@CanonicalImage = "ID", @Image = "ID"]
| | +- ID[@CanonicalImage = "ID", @Image = "ID"]
| +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"]
| | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"]
| +- Column[@CanonicalImage = "TEXT", @Image = "TEXT"]
| | +- ID[@CanonicalImage = "TEXT", @Image = "TEXT"]
| +- Column[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"]
| | +- ID[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"]
| +- ValuesClause[@CanonicalImage = null]
| +- Expression[@CanonicalImage = "", @Image = ""]
| | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "", @Image = ""]
| | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"]
| +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false]
| | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"]
| +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false]
| | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"]
| +- Expression[@CanonicalImage = "123123", @Image = "123123"]
| +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false]
| +- Literal[@CanonicalImage = "123123", @Image = "123123"]
| +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"]
+- Statement[@CanonicalImage = null]
| +- UnlabelledStatement[@CanonicalImage = null]
| +- MergeStatement[@CanonicalImage = null]
| +- TableName[@CanonicalImage = "B", @Image = "b"]
| | +- ID[@CanonicalImage = "B", @Image = "b"]
| +- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false]
| | +- SelectList[@CanonicalImage = null]
| | | +- SqlExpression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"]
| | | +- ColumnAlias[@CanonicalImage = "KEY1", @Image = "key1"]
| | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- SqlExpression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"]
| | | +- ColumnAlias[@CanonicalImage = "TEXT", @Image = "text"]
| | | | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| | | +- SqlExpression[@CanonicalImage = "123123", @Image = "123123"]
| | | | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false]
| | | | +- Literal[@CanonicalImage = "123123", @Image = "123123"]
| | | | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"]
| | | +- ColumnAlias[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- FromClause[@CanonicalImage = null]
| | +- TableReference[@CanonicalImage = null]
| | +- TableName[@CanonicalImage = "DUAL", @Image = "dual"]
| | +- ID[@CanonicalImage = "DUAL", @Image = "dual"]
| +- TableAlias[@CanonicalImage = "E", @Image = "e"]
| | +- ID[@CanonicalImage = "E", @Image = "e"]
| +- Condition[@CanonicalImage = null]
| | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"]
| | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="]
| | | +- SqlExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"]
| | | | +- PrimaryPrefix[@CanonicalImage = "B.KEY1", @Image = "b.key1", @SelfModifier = false]
| | | | +- SimpleExpression[@CanonicalImage = "B.KEY1", @Image = "b.key1"]
| | | | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"]
| | | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- SqlExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"]
| | | +- PrimaryPrefix[@CanonicalImage = "E.KEY1", @Image = "e.key1", @SelfModifier = false]
| | | +- SimpleExpression[@CanonicalImage = "E.KEY1", @Image = "e.key1"]
| | | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | | +- Column[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | +- Condition[@CanonicalImage = null]
| | +- CompoundCondition[@CanonicalImage = null, @Type = null]
| | +- ComparisonCondition[@CanonicalImage = null, @Operator = "="]
| | +- SqlExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"]
| | | +- PrimaryPrefix[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id", @SelfModifier = false]
| | | +- SimpleExpression[@CanonicalImage = "B.LCE_ID", @Image = "b.lce_id"]
| | | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- SqlExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"]
| | +- PrimaryPrefix[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "E.LCE_ID", @Image = "e.lce_id"]
| | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | +- Column[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| +- MergeUpdateClause[@CanonicalImage = null]
| | +- TableName[@CanonicalImage = "B", @Image = "b"]
| | | +- ID[@CanonicalImage = "B", @Image = "b"]
| | +- Column[@CanonicalImage = "TEXT", @Image = "text"]
| | | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| | +- Expression[@CanonicalImage = "E.TEXT", @Image = "e.text"]
| | +- PrimaryPrefix[@CanonicalImage = "E.TEXT", @Image = "e.text", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "E.TEXT", @Image = "e.text"]
| | +- TableName[@CanonicalImage = "E", @Image = "e"]
| | | +- ID[@CanonicalImage = "E", @Image = "e"]
| | +- Column[@CanonicalImage = "TEXT", @Image = "text"]
| | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| +- MergeInsertClause[@CanonicalImage = null]
| +- Column[@CanonicalImage = "ID", @Image = "ID"]
| | +- ID[@CanonicalImage = "ID", @Image = "ID"]
| +- Column[@CanonicalImage = "KEY1", @Image = "KEY1"]
| | +- ID[@CanonicalImage = "KEY1", @Image = "KEY1"]
| +- Column[@CanonicalImage = "TEXT", @Image = "TEXT"]
| | +- ID[@CanonicalImage = "TEXT", @Image = "TEXT"]
| +- Column[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"]
| | +- ID[@CanonicalImage = "LCE_ID", @Image = "LCE_ID"]
| +- ValuesClause[@CanonicalImage = null]
| +- Expression[@CanonicalImage = "", @Image = ""]
| | +- PrimaryPrefix[@CanonicalImage = "", @Image = "", @SelfModifier = false]
| | +- SimpleExpression[@CanonicalImage = "", @Image = ""]
| | +- ID[@CanonicalImage = "JHS_SEQ", @Image = "JHS_SEQ"]
| +- Expression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false]
| | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"]
| +- Expression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false]
| | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"]
| +- Expression[@CanonicalImage = "123123", @Image = "123123"]
| +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false]
| +- Literal[@CanonicalImage = "123123", @Image = "123123"]
| +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"]
+- Statement[@CanonicalImage = null] +- Statement[@CanonicalImage = null]
+- UnlabelledStatement[@CanonicalImage = null] +- UnlabelledStatement[@CanonicalImage = null]
+- MergeStatement[@CanonicalImage = null] +- MergeStatement[@CanonicalImage = null]
+- TableName[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"] +- TableName[@CanonicalImage = "B", @Image = "b"]
| +- ID[@CanonicalImage = "JHS_TRANSLATIONS", @Image = "jhs_translations"]
+- TableAlias[@CanonicalImage = "B", @Image = "b"]
| +- ID[@CanonicalImage = "B", @Image = "b"] | +- ID[@CanonicalImage = "B", @Image = "b"]
+- QueryBlock[@All = false, @CanonicalImage = null, @Distinct = false, @Unique = false] +- TableName[@CanonicalImage = "E", @Image = "e"]
| +- SelectList[@CanonicalImage = null]
| | +- SqlExpression[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | +- PrimaryPrefix[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @SelfModifier = false]
| | | +- Literal[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'"]
| | | +- StringLiteral[@CanonicalImage = "\'PROM_EDIT_PROM_NR\'", @Image = "\'PROM_EDIT_PROM_NR\'", @String = "PROM_EDIT_PROM_NR"]
| | +- ColumnAlias[@CanonicalImage = "KEY1", @Image = "key1"]
| | | +- ID[@CanonicalImage = "KEY1", @Image = "key1"]
| | +- SqlExpression[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | +- PrimaryPrefix[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @SelfModifier = false]
| | | +- Literal[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'"]
| | | +- StringLiteral[@CanonicalImage = "\'EDYCJA PROMOCJI NR\'", @Image = "\'Edycja promocji nr\'", @String = "Edycja promocji nr"]
| | +- ColumnAlias[@CanonicalImage = "TEXT", @Image = "text"]
| | | +- ID[@CanonicalImage = "TEXT", @Image = "text"]
| | +- SqlExpression[@CanonicalImage = "123123", @Image = "123123"]
| | | +- PrimaryPrefix[@CanonicalImage = "123123", @Image = "123123", @SelfModifier = false]
| | | +- Literal[@CanonicalImage = "123123", @Image = "123123"]
| | | +- NumericLiteral[@CanonicalImage = "123123", @Image = "123123"]
| | +- ColumnAlias[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| | +- ID[@CanonicalImage = "LCE_ID", @Image = "lce_id"]
| +- FromClause[@CanonicalImage = null]
| +- TableReference[@CanonicalImage = null]
| +- TableName[@CanonicalImage = "DUAL", @Image = "dual"]
| +- ID[@CanonicalImage = "DUAL", @Image = "dual"]
+- TableAlias[@CanonicalImage = "E", @Image = "e"]
| +- ID[@CanonicalImage = "E", @Image = "e"] | +- ID[@CanonicalImage = "E", @Image = "e"]
+- Condition[@CanonicalImage = null] +- Condition[@CanonicalImage = null]
| +- CompoundCondition[@CanonicalImage = null, @Type = "AND"] | +- CompoundCondition[@CanonicalImage = null, @Type = "AND"]