I am trying to convert a large Sql Query that has Top statements. I think the query was a stored query on a remote network. I am trying to get the query working in Access 97.
this is the original code:
AND tblA537.DepotID BETWEEN @intDepotID AND @intTopDepotID
AND tblClient.ClientID BETWEEN @intClientID AND opClientID
AND tblcontract.ContractID BETWEEN @intContractID AND @intTopContractID
This is the start of my version below but I am having
trouble getting the top statment to work.
SELECT dbo_tblA537.DepotID
FROM dbo_tblA537
where dbo_tblA537.DepotID between TOP 1 dbo_tblA537.DepotID and dbo_tblA537.DepotID
Would anyone know how I could get this going.
Thank you.
Regards,
Sid
this is the original code:
AND tblA537.DepotID BETWEEN @intDepotID AND @intTopDepotID
AND tblClient.ClientID BETWEEN @intClientID AND opClientID
AND tblcontract.ContractID BETWEEN @intContractID AND @intTopContractID
This is the start of my version below but I am having
trouble getting the top statment to work.
SELECT dbo_tblA537.DepotID
FROM dbo_tblA537
where dbo_tblA537.DepotID between TOP 1 dbo_tblA537.DepotID and dbo_tblA537.DepotID
Would anyone know how I could get this going.
Thank you.
Regards,
Sid