So I have a view created on SQL server and I want to load it onto an excel sheet, but when the rows load onto the sheet they just keep loading and don't stop. For example it will have loaded 10 million rows when there isn't even that many and will still keep loading rows. What error is causing this?
There is a problem with the query in sql server which is causing this error. There is statements within the query which are not needed and include fields that are not being used in the excel sheet. I've had this before and by doing this the correct rows would load onto the sheet. Another method if that doesn't work would just be to create the view again and add the tables and select columns needed.
Related
I'm having some trouble loading a fact table (Fact_Servicio) of a star schema I made in SQL Server, here the diagram:
All the ID's are identity columns.
Our case is the following: we have a Service Desk software which makes daily reports, and we want to use this data to make Business Intelligence, creating a Data Mart (Star Schema) in which we will populate all this data and then display it through Power BI.
Current problem: our issue is in the ETL process with SSIS. After creating the database in SQL Server, we made a SSIS Package to populate all the data from the excel file to this Star-Schema, we start by populating the dimensions, and after this we attempt to populate the fact table Fact_Servicio, but we don't know how exactly to take the ID's of each dimensions, join them with the fields we need to grab from the excel file(which are our previously defined measures) and then insert all in the fact table, we tried using the lookup transformation, but we cannot match any dimension ID with any column in the excel file because these ID's are created in the database and they just autogenerate per record. (The lookup task needs to match the columns we grabbed with columns in the excel file but in the Excel file we don't have any column for ID's, and we wouldn't like to create fields for it because we want to avoid manual tasks as much as possible, because this would be a repetitive task every time we export the data from the Service Desk Software). Here I'm putting some pictures of our SSIS Package structure:
Control Flow View:
Data Flow View of the Fact Table:
Look Up View:
Connection Tab
Columns Tab
Here is where we can't match columns because the ID's are created in the database.
Guys, if there is maybe other way to do this data load, then go ahead and propose how would you do it, otherwise what can we fix here or what transformations from the toolbox can we use. We were also thinking about loading the big excel file sheet to one big single table in SQL Server and work from there but we aren't sure if we would get advantages by doing this.
Thank you all!
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
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
I built my code in SSMS. It returns 900 rows. I ported the same code over to SSRS, ran it through Query Builder, it returns a lot of records. Great!
For simplicity sake I just pull a table over to the report, point it to my newly created dataset that's showing rows upon rows of data returned (in the Query Builder). I drag 1 column over (OrderID) to just make sure it's working. I preview the report.
Nothing shows up in my table.
For troubleshooting purposes I write a simple sql statement to pull the top 100 rows from just one table, change the dataset to my new, test dataset & run it. Runs fine. I get a lot of pages of 1 column. Table, dataset & datasource are connected and running fine.
Why does my statement, which works in SSMS and the query builder within SSRS, not return any data in SSRS table?
No, I haven't changed any properties or anything of the sort.
Exact same datasource in SSRS that I'm testing against in SSMS.
Here's a screenshot of my table as requested:
If this comes up again, it could very well be a corrupt datasource be it embedded or shared.
In my case it was shared. I deleted it all together, recreated it, tested it and when I previewed the report, all my data was there.
Have a nice day.
I have an Excel file linked to MS SQL Server through ADO connections. Within this file I can update data in the database. IE each row in Excel is a row in SQL Server.
Everything works great, except for some reason certain column headers in my SQL Server get written into every row of data and I'm not sure why. For example, my column header is Construction Date. What I see in every row of that column is construction date.
This problem seems to only occur from one of the Excel files I have. I have multiple Excel files accessing the same table in SQL Server but the only fields that seem to have this problem are the ones in that specific Excel file. The code is the same across all Excel files, the only difference is the users. That leaves me to assume the problem is because Excel crashes.
Anyone know why this occurs?
There is no select statement. The excel data is just a linked table to SQL server. The update statement is based on primary keys and is hard coded. The data that has changed is stored on a seperate tab and the update runs when you click a button.