Is there a way to update an oracle database by simply editing a table in excel? - database

I have gotten oracle database to connect to an excel spreadsheet except for 1 issue -- the excel table is not properly refreshing (i.e. a row I deleted in oracle still shows up in excel version). How is this happening? I cannot figure out how to get it to reflect the current version of the database without making a new spreadsheet and reconnecting. Even if I clear the table, My refresh data button brings back those rows that don't exist anymore
Also, I want to make a user-friendly way to add or delete rows in oracle via excel spreadsheet. So whatever I do in excel would automatically update in the oracle database. Is this even possible or am I really overreaching?
Does anyone have any ideas or tips? I'm not very technical so please dumb down any responses

Related

Update data from SQL sever directly in excel

Is there anyway I can update data from my SQL server table directly in Excel?
It is easy enough to connect to my table and get updated data into Excel, but i am looking for the solution to go the other way around.
My table is being used in a Web app and updates rely heavily on me, so i would like to make it easy for others to update the data directly from excel.
excel 2016

Retrospective Tracking of Manual Table Editing in SQL Server

Is there anyway to retrospectively determine if a table (or rows/fields) have been manually edited in SQL Server 2016.
Yup, you read that right. I'm trying to unravel some inconsistent data on a production database. Based on my interactions with the user and analysis of the table in question (sequential IDs don't make sense, LastUpdateDate fields inconsistent, etc.), I suspect that the table was manually edited.
Yup, it's the production database.
I appreciate that I won't be able to get what fields have changed but if I can show that the user HAS manually edited the table/database, we can work to resolve the situation.

Importing data from Excel to SQL table using button

I have an Excel file that looks like the below
System | Status
Test OK
Test2 Down
Test3 OK
I also have a SQL server table with the same columns.
What I want is a button on the Excel sheet that once clicked, will truncate the SQL table and insert the values from the Excel table into the SQL table.
I have tried the below step but I am struggling due to my lack of understanding of developing in Excel (I am a SQL developer)
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/84725bcb-328d-4aed-8b95-d2c34dc46be4/need-to-update-sql-server-table-on-click-of-excel-button?forum=sqldataaccess
Any help would be massively appreciated!
Thanks
We have created an Excel Add-In for updating tables from Excel to SQL Server which have a Save button that will save your changes in Excel to the mapped table in SQL Server. The Add-In is built for non-technical people so it is rather straightforward to set up the spreadsheet without having to write any code.
It won't truncate the table, but there are a couple of ways to update the table which hopefully will give you the same result. Without knowing your exact use case, I would propose to either just do an update of the table from Excel if that meets your requirements, or add a timestamp column and let the Add-In write the timestamp to each updated/inserted row and then only use the last updated/inserted rows (you can also let the Add-In delete all previous rows after a new insert).
If that's of interest, you can read more here and download a free trial.
Disclaimer: I'm the founder of the company.

Get data from SQL Server with Excel vba and modify some of them then update the table

I have a SQL Server table with some row (max 6000). With Excel vba, I can create a query and the results can show in a sheet.
Next I can change some record in the worksheet.
After all I can make a copy from the original sheet and after some cells changed I compare all the cells and I can update in the SQL Server database only the different cells.
My question is there a simpler way to do this?
Maybe after I leave a cells the vba compare the before/after content and make an update if required?
Thanks your opinions!
This is the VBA event you should use to catch if a cell is changed:
https://msdn.microsoft.com/en-us/vba/excel-vba/articles/worksheet-change-event-excel
If you don't want to spend much time on it, I have created an Excel AddIn which updates data from Excel to SQL Server. It is a commercial product, but if it is a one time job there is a fully functional 14-day trial which you can download from
https://sqlspreads.com

What would be the best method for building Dynamic Reports from my SQL DB Data?

I am building a simple database with about 6-7 tables. I will be setting a schedule to do a clean import from a .txt file.
I want to take this data and create a report, like I would do in an excel spreadsheet, convert it to a pdf and post it to our company intranet for those interested to access it.
I'm trying to think of the best way to build my report. Would I just use an excel spreadsheet with a direct connection to the database? Would I create some sort of console application (c/c#/vb/vb.net) that would query the db, generate the report in an excel file, convert to pdf and save?
I'm quite comfortable in these different languages, just not as experienced in the reporting services (although I do have a lot of experience working with EXCEL and VBA Macros) but I want to get into it (SSRS) and get familiar with it as I will be doing a lot of projects like this in the future. This is seems like an easy one to get my hands dirty with and learn and build off of.
Any insight or suggestions would be greatly appreciated.
Thanks so much!
My suggestion:
Create desired SQL queries to retrieve the data in desired form
Link these queries to your Excel sheet, perhaps directly in form of pivot tables for aggregation of results
Using VBA, you can easily create PDF from the data at the click of a button
The initial design will be time intensive, but after that, everything is automated and one just needs to press the button that creates the PDF.
How to link Access queries to your Excel file:
Data --> Get external Data
You can easily refresh all data whenever you open the Excelsheet by using the code below in the On Open event of the workbook:
ThisWorkbook.RefreshAll
If you need further clarification, do not hesitate to ask
If your end goal is to create a PDF that will be out on your intranet then I would create the report in SSRS. Then you can schedule it to run and output a PDF to your network location.
I've had good experiences using a pivot table in Excel which is a connected table to your SQL database.
In the connection parameters in Excel there is a field where you can define your SQL query, whether it be to call a stored procedure or just a simple SELECT statement.
The main reason I prefer a pivot table SQL connection rather than a normal table connection is because if you have a chart that references the connected table, the chart formatting will be reset when you refresh your connection (if you need to updated your report).
If I use a chart that references a pivot table (or a pivot chart) then the formatting is retained.

Resources