Bear in mind that I am just a beginner and ingorance is bliss!
1. Could someone tell me the most efficient (and easiest) way to move summurize and move data from one db on server A to another db on serverB. This process needs to run on an hourly basis.
If they were on the same server I would create a job under Management and use this code.
INSERT INTO tblNewTable
SELECT SUM(thiscolumn), SUM(thatcolumn), SUM(ETC)
WHERE columnDateTime > (SELECT MAX(columnDateTime) FROM tblNewTable)
GROUP BY DATEPART(hh, columnDate), Line, Shift
My problem is I THINK that you have to script the connection between the two severs and I dont know how to do this.
2. In tblNewTable, the data is used to report machine efficency for each line and shift. The problem is that the 3rd shift begins at 11PM, but its production is applied to the following day. I have used
WHERE columnDateTime >= DATEADD(hh, -1, StartDate) AND columnDateTime <= DATEADD(hh, -1, EndDate)
and leave off the GROUP BY columnDateTime to get the shift's data together.
Is it possible for 11 to 12 PM to be brought in as the following days date?