Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedJoin us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now
Hi,
reading the documentation I've noticed the absence of the MERGE statement.
Does Fabric support this more important statement? Why not?
A such statement is very very important to work with a data warehouse!
In SQL Server I've used this statement, in Azure Synapse Analytics I've used this statement,
but I cannot find it in Fabric.
I hope that this feature could be released as soon as possible.
Many many thanks
Solved! Go to Solution.
I agree, it is a handy syntax.
It seems, MS is already working on it though 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
I agree, it is a handy syntax.
It seems, MS is already working on it though 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi @pmscorca ,
You are right, it seems ot be a current limitation:
T-SQL surface area - Microsoft Fabric | Microsoft Learn
However, you might be able to use another syntax than the merge statement, e.g. the code below:
MERGE INTO target_table AS target USING source_table AS source ON target.id = source.id WHEN MATCHED THEN UPDATE SET target.col1 = source.col1, target.col2 = source.col2 WHEN NOT MATCHED THEN INSERT (id, col1, col2) VALUES (source.id, source.col1, source.col2);
translates to:
UPDATE target_table SET target_table.col1 = source_table.col1, target_table.col2 = source_table.col2 FROM source_table WHERE target_table.id = source_table.id; INSERT INTO target_table (id, col1, col2) SELECT source_table.id, source_table.col1, source_table.col2 FROM source_table LEFT JOIN target_table ON source_table.id = target_table.id WHERE target_table.id IS NULL;
Let me know, if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
Also happily accepting Kudos 🙂 |
Feel free to connect with me on LinkedIn! | |
#proudtobeasuperuser | |
Hi, thanks for your reply, but I know that it occurs to use an update and an insert statements when merge statement isn't available.
The focus of the post is about the merge statement ... having a such feature is very very important.
Thanks
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Fabric update to learn about new features.
User | Count |
---|---|
4 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
8 | |
4 | |
4 | |
2 | |
2 |