Can I use an actual SQL statement to query a database via Power Query?

miconian

Well-known Member
Joined
Aug 18, 2004
Messages
769
I'm using 2016. My external database is TeraData. I have no problem connecting the two, and getting the Query Editor window looking at the database table that is relevant to me.

However, I don't know M, and I already have a SQL query that I had been using to query the data directly in TeraData (and then pasting into Excel).

Is there really not a way that I can keep using that query, if I want to pull the data in through Excel? Must I re-write it in M?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Yes there is a way. Select the data source being your database type. Somewhere in the first step of the wizard, there is an option to add SQL.
 
Upvote 0
I don't think so. There is an option to connect to a MySQL database, but that's not the same thing, and anyway, I choose the option to connect to TeraData, since that's what I have.
 
Upvote 0

Forum statistics

Threads
1,216,731
Messages
6,132,393
Members
449,725
Latest member
Enero1

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top