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
Hello,
I am currently trying to create a stored procedure that I previously had on a SQL DB and there are a lot of syntax differences that I have to adjust to the warehouse syntax in Fabric. One of those is getting the schema name and stored procedure name of the currently running T-SQL module in the format [schema_name].[Object_name].
In SQL DB syntax, I can get this inside the stored procedure using
SELECT OBJECT_SCHEMA_NAME(@@PROCID) + '.' (OBJECT_NAME(@@PROCID)
My current solution for Fabric is
Solved! Go to Solution.
Something like this:
Hi @Etc you could try this snippet of code to get the name of the proc currently being executed
Hi Andy,
Thank you for your answer. The code snippet you provided gives me the name of the stored procedure, but I also want the name of the schema. Is there a similar command that can get me the schema name that the SP lies in?
Something like this:
Thank you, Andy, this worked!
If anyone else is trying to do the same thing, the code snippet works, however it requires the user to have the Admin role.
Hi @Etc ,
Thanks for using Microsoft Fabric Community and reporting this.
I have reached the internal team for help regarding this. I will update once I hear back from them.
Appreciate your patience.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Fabric update to learn about new features.
User | Count |
---|---|
27 | |
19 | |
5 | |
3 | |
2 |
User | Count |
---|---|
26 | |
26 | |
16 | |
12 | |
12 |