Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-12-2023 07:18 AM
Hi I am trying to use the SQL Merge statement on databricks
MERGE INTO target
USING source
ON source.key = target.key
WHEN MATCHED
UPDATE SET *
WHEN NOT MATCHED
INSERT *
WHEN NOT MATCHED BY SOURCE
DELETE
This is failing with the error [PARSE_SYNTAX_ERROR] Syntax error at or near 'UPDATE'.(line 18, pos 2). I am running my notebook on a cluster that is running Databricks 12.2
Any help is appreciated.