I have a query that output to a excel sheet daily and instead outputting to excel, I want to store those daily result set to a table without truncate the table. The purpose what I am trying to do is to keep those daily result set (historical)
Here is my simple sql query:
Select Column1, column2, datefield
From InventoryTbl
Where datefield = convert(date,getdate())
so, this query will run daily and I want to load the result set to this below table;
DailyTableLoad
the question, if I load today result set, can I keep today's result set for tomorrow load and so on?
I tried to run my test query, it executed and I can see the result set in the DailyTableLoad table I created but the second time I re run the same query, I got this error:
There is already an object named 'DailyTableLoad' in the database.