I am trying to copy a range of records from an Acess database on a server to an SQL server table.
I have a wealth of experience as I've made 1 stored procedure already.
I feel I may be close but could use a nudge. Here's what I have so far. It is a create procedure but I'll execute it after I create it.
CREATE PROCEDURE UpdateTable
@StartDate DATETIME,
@EndDate DATETIME
AS
INSERT INTO TABLE2 SELECT * FROM TABLE1
WHERE ActPatInDate BETWEEN @StartDate AND @EndDate;
I intend to pass the criteria when I execute it in VBA. TABLE2 is my sql server table. It is called 'Results'.
TABLE1 is a table called tbleCombined from my Access database on a totally different server, but one which I am mapped to.
Any help would be greatly appreciated. Thank you.
I have a wealth of experience as I've made 1 stored procedure already.
CREATE PROCEDURE UpdateTable
@StartDate DATETIME,
@EndDate DATETIME
AS
INSERT INTO TABLE2 SELECT * FROM TABLE1
WHERE ActPatInDate BETWEEN @StartDate AND @EndDate;
I intend to pass the criteria when I execute it in VBA. TABLE2 is my sql server table. It is called 'Results'.
TABLE1 is a table called tbleCombined from my Access database on a totally different server, but one which I am mapped to.
Any help would be greatly appreciated. Thank you.