Created
December 12, 2023 08:08
-
-
Save sqlparser/4e623fd6b27521803cade381e1b2b786 to your computer and use it in GitHub Desktop.
SAP Hana Sample SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```sql | |
MERGE INTO "my_schema".t1 USING "my_schema".t2 ON "my_schema".t1.a = "my_schema".t2.a | |
WHEN MATCHED THEN UPDATE SET "my_schema".t1.b = "my_schema".t2.b | |
WHEN NOT MATCHED THEN INSERT VALUES("my_schema".t2.a, "my_schema".t2.b); | |
MERGE INTO T1 USING T2 ON T1.A = T2.A | |
WHEN MATCHED AND T1.A > 1 THEN UPDATE SET B = T2.B | |
WHEN NOT MATCHED AND T2.A > 3 THEN INSERT VALUES (T2.A, T2.B); | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment