Hi all, I'm trying to get a column in my query to start from the last number in one of my table do a +1 on each line in the query, that is gonna be append to this same table, here is the code if I just choose the last number for each row:
INSERT INTO [PO Header] ( AccessID, Vendor, [Date], [Store#] )
SELECT Last([PO Header].AccessID) AS LastOfAccessID, [Import DFR with Store#].Vendor, Date() AS [Date], [Import DFR with Store#].[Store#]
FROM [PO Header], [Import DFR with Store#]
GROUP BY [Import DFR with Store#].Vendor, [Import DFR with Store#].[Store#];
I'm sure one of you have an easy way to go around that, hope I will be this good soon enough
INSERT INTO [PO Header] ( AccessID, Vendor, [Date], [Store#] )
SELECT Last([PO Header].AccessID) AS LastOfAccessID, [Import DFR with Store#].Vendor, Date() AS [Date], [Import DFR with Store#].[Store#]
FROM [PO Header], [Import DFR with Store#]
GROUP BY [Import DFR with Store#].Vendor, [Import DFR with Store#].[Store#];
I'm sure one of you have an easy way to go around that, hope I will be this good soon enough