SQL Data import overwriting previous data that report is based on.

Dannytt93

New Member
Joined
Feb 13, 2019
Messages
9
Hello,

I have a connection to an SQl Database running on excel. There is another tab with several formulas that all look at the imported table which has several columns.

the table imported looks as follows
[TABLE="width: 500"]
<tbody>[TR]
[TD]Status[/TD]
[TD]Department[/TD]
[TD]Number in status[/TD]
[TD]Date Report Ran[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Open[/TD]
[TD]Applications[/TD]
[TD]7[/TD]
[TD]29/03/2019[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]in progress[/TD]
[TD]Applications[/TD]
[TD]6[/TD]
[TD]29/03/2019[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


This works great when i want to import the data into the table BUT.. when i change the date from 29/03/2019 to 05/04/2019 which is the next column along where i want it to deposit the data using a formula e.g.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Ticket status's[/TD]
[TD]29/03/2019[/TD]
[TD]05/04/2019[/TD]
[/TR]
[TR]
[TD]Open[/TD]
[TD]7[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]in progress[/TD]
[TD]6[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


The data is disappearing from column "29/03/2019" and inputting the up to date data in 05/04/2019.

[TABLE="width: 500"]
<tbody>[TR]
[TD]Ticket status's[/TD]
[TD]29/03/2019[/TD]
[TD]05/04/2019[/TD]
[/TR]
[TR]
[TD]Open[/TD]
[TD][/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]in progress[/TD]
[TD][/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]


Is there anyway for excel to not delete that data and just deposit the new one next to it so it looks like:

[TABLE="width: 500"]
<tbody>[TR]
[TD]Ticket status's[/TD]
[TD]29/03/2019[/TD]
[TD]05/04/2019[/TD]
[/TR]
[TR]
[TD]Open[/TD]
[TD]7[/TD]
[TD]8[/TD]
[/TR]
[TR]
[TD]in progress[/TD]
[TD]6[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]


Without having to do a brand new import on a separate tab every time i want to update the data?

the idea is that it is fully automated and doesnt require any manual input. So when the report is opened on the specific date (which is once a week every friday), the data will have already populated in the correct column.

Any help would be great

Thanks in advance

Dan
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
how is the sql populating the sheet, do you use vba ?
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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