Run oracle sql query in excel? - excel

Is it possible to have the queries I have written in developer run in excel? I can connect to the db in excel but I'm unsure of how to find and run the queries.

Check out this page.
Once you're able to connect, you should be able to query the database in its native language. Select the Power Query tab, then the drop-down From Database -> From Oracle Database. Simply copy/paste your existing Oracle query into the SQL Statement box and you should be good to go.
In case you don't already have it, Power Query is an add-in for Excel. You can find it here.

Related

MySQL query from excel without ODBC

Is possible to get connection to mysql server from excel macro, without downloading any ODBC connector? I have found solutions only with this connector. Problem is, that I have to send excel workbook to some people which they don't have this connector in their computer, and it will be a little problem to set it for them.
I need to make only one INSERT query.

Changing the Power query SQL Server database settings when moving an Excel workbook

I'm working on creating an excel report that collects data from a local copy of a SQL Server database on my maschine, where I use Power Query to retrieve the data. These are then loaded into a PowerPivot data model. Now I'm finished with the development and on my way to put this into production on another server on the customer's server. The Excel workbook must change database settings using sql server database user Connection (not integrated). I had hoped that I could change the database Connection Properties at the Data tab, but there are not any easy way to change the connection string to the new server. Now I can't see any option that going through every Power Query query and change them manually. I have great hope that you Power Query experts have a Nice explaination and an example how I can solve this.
Hope to hear from you soon
Regards Geir F
There isn't a great solution for bulk server rename today, but we're very aware of the customer demand! (I can't promise anything about upcoming features, but at some point in the past I heard the dev team discuss this feature.) I'd recommend showing your support for this feature at https://excel.uservoice.com/
If you need to solve this soon, manually opening each query and editting the server string is what you need to do, sorry :\
(If you're building new reports again, Power BI Desktop lets you parameterize the server name to a top-level query, which would allow for quick rename operations!)
Do you only need to change the server name? If you go to the Data Source Settings window, you can select the SQL Server source you are using and click on the "Change Source..." button. If you change the server name in that dialog, it will change the server name in all of the queries that use that source (assuming it's the first step in the query).

Self-updating spreadsheet

Is it possible to create a spreadsheet that updates itself on a regular basis (daily, bi-weekly or monthly)? We use PostgreSQL. The content of the sheet is going to be based off a query I wrote.
What's the easiest way to connect an Excel spreadsheet to Postgres?
So far I have looked at:
A Microsoft product: https://support.office.com/en-us/article/Connect-to-a-PostgreSQL-database-Power-Query-bf941e52-066f-4911-a41f-2493c39e69e4
PostgreSQL's ODBC: https://odbc.postgresql.org/
However I can't find a clear explanation of how I am practically going to set up the spreadsheet.
A quick high-level explanation to connect excel to a database:
You can connect to a ODBC enabled DBMS's view or table using Excel's Get External Data buttons. Specifically in the Data tab, the From other Sources button.
To use this, you need to create a new DSN for your connection. Start>>"Search Box">>ODBC and use the 64-bit ODBC administrator to create a new System DSN. The DSN is the thing that will hold your ODBC connection's information, like the server address, username, password, etc...
Back in Excel you click the From Other Sources button in the Data tab and pick that DSN you just made. Then you can find the View you generated in Postgres and tell it which range you want to dump the data. That range then will hold the connection information so you can refresh any time you want.
Then, when you open the workbook you can just refresh the connection and pick up new data lickety-split.
There's other ways to connect Excel to ODBC and OLEDB enabled databases like using ADODB in VBA, but that's more complicated and probably overkill for you needs.

How publish changes to OData feed from Excel

I've created an IUpdateable ODATA feed using WCF which I can connect to using Excel 2010 Power Query. Excel is able to retrieve data but I cannot find a 'publish' button or anyway to tell Excel to push updates back to the server.
Does Excel / Power Query support ODATA CRUD functions out of the box?
Is there another tool I could use to update data without writting code?
Power Query supports reading from data sources, but we don't support Create/Update/Delete.
I agree with you--it would be awesome to publish data from Excel without having to write any code!
If you think this is something Power Query should have, I'd go to https://ideas.powerbi.com and vote up the feature (you might be the first with the idea).
Edit(2019): Looks like several people have upvoted this one: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/12251397-q-a-can-you-perform-crud-operations-with-powerquer

Windows Azure: importing data from Excel sheet?

I have a Windows Azure mobile service with a sql database.
I was wondering if it's possible to insert records from an excel sheet to an azure database table.
in other words, I have an excel sheet with many data records, I want to export the records to a database table.
is there any tool/service/SDK that provides this ?
I don't know of a tool that does that natively, but you can save your data in Excel as a CSV file, and use the BCP utility to load that data into any SQL database. Here is an older blog about the use of BCP with Azure SQL Database to get you started. If you are familiar with SSIS, you could import your data that way as well.
you could also try that that through SSMS normally (edit all rows and then just add it :-)) or use Access to connect to the front end?

Resources