The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
hello all,
My SQL script with GO statements in them works fine is SSMS, it is able to query the database.
But when I copy the script in Power Query's SQL Statement to make connection with the database, it gives me the following error
But when I take the GO statements out, the PQ is able to connect with the database.
Am I able to fix this error or is GO statement not allowed in PQ?
Solved! Go to Solution.
Not allowed. You can only run queries*, not transactions.
Use a Stored Procedure or a view to hide the "ugly" code from Power Query.
* yes, I said queries. While you are supposed to only ever run a single SELECT query, it is unfortunately technically possible to chain all sorts of crazy queries as long as the last one is a SELECT.
Not allowed. You can only run queries*, not transactions.
Use a Stored Procedure or a view to hide the "ugly" code from Power Query.
* yes, I said queries. While you are supposed to only ever run a single SELECT query, it is unfortunately technically possible to chain all sorts of crazy queries as long as the last one is a SELECT.