Hey All,
Unfortunatly I seem to have hit a brick wall with an application I am currently developing. I have tried everything I can think on, but just cant get my head around how to acheive what I need.
Basically, I am using Pass-Through queries to query a remote SQL Server, the application has to create reports on various data from within the SQL Database.
Currently, my code generates two Access tables, which contain around 10 dates/times, each on a separate row. One table contains 10 Start date/times and the other, the 10 corresponding End date/times. I then need to perform various Pass-Through queries to the SQL Server based on the data in these records, for example (in Pseudo Code):
SELECT some value FROM remote SQL Server tables WHERE Date > first record from StartTimes access table AND < first record from EndTimes access table
And so on until the value has been found between each. Then once this is done, I will ultimately merge the Access tables together to arrive at something like:
Start Times End Times Peak Temp
01/01/2011 09.00 02/01/2011 08.00 33
03/01/2011 11.00 04/01/2011 13.00 31 etc etc
My big problem is comes when I have to get the Peak Temp values, I can loop through the records in the Start Times access table, but in order to query the Peak Temp values, I need both the Start Time and the corresponding End Time, which is where I am totally lost.
Any help would be greatly appreciated.
Unfortunatly I seem to have hit a brick wall with an application I am currently developing. I have tried everything I can think on, but just cant get my head around how to acheive what I need.
Basically, I am using Pass-Through queries to query a remote SQL Server, the application has to create reports on various data from within the SQL Database.
Currently, my code generates two Access tables, which contain around 10 dates/times, each on a separate row. One table contains 10 Start date/times and the other, the 10 corresponding End date/times. I then need to perform various Pass-Through queries to the SQL Server based on the data in these records, for example (in Pseudo Code):
SELECT some value FROM remote SQL Server tables WHERE Date > first record from StartTimes access table AND < first record from EndTimes access table
And so on until the value has been found between each. Then once this is done, I will ultimately merge the Access tables together to arrive at something like:
Start Times End Times Peak Temp
01/01/2011 09.00 02/01/2011 08.00 33
03/01/2011 11.00 04/01/2011 13.00 31 etc etc
My big problem is comes when I have to get the Peak Temp values, I can loop through the records in the Start Times access table, but in order to query the Peak Temp values, I need both the Start Time and the corresponding End Time, which is where I am totally lost.
Any help would be greatly appreciated.