The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Need help in creating a button in power bi that should perform the action of truncating a table in Power BI desktop file.
I am using the DirectQuery mode and trying to execute a stored procedure for truncating the data but with no success in it till now.
Please help me with your inputs for it.
Hi @sajal161292
its possible to do that using the OPENROWSET function as the example bellow
SELECT * FROM OPENROWSET('SQLOLEDB','SERVER=SERVERNAME;Trusted_Connection=yes;', 'set fmtonly off;exec DW..P750106100 @NR_VERSION=1, @NR_INSTI=NULL,@NR_YEAR=NULL')
The only problem is that you need to specify the parameters on the call. I didn't find another way beyond that
obs: dont forget to enable it in SQLServer
USE MASTER sp_configure 'show advanced options', 1; RECONFIGURE; GO sp_configure 'Ad Hoc Distributed Queries', 1; RECONFIGURE; GO
Hi @sajal161292,
You may have a reference to the similar post below that makes use of OPENROWSET.
Calling SQL stored procedure with Direct Query
Best Regards,
Cherry
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
80 | |
77 | |
43 | |
39 |
User | Count |
---|---|
150 | |
117 | |
67 | |
64 | |
56 |