valid price inside date range

dylan_dog

Registered User.
Local time
Today, 02:35
Joined
Jan 2, 2012
Messages
40
Hi guys,

It may be extremely simple, but I'm stuck here. I have a table with prices for two products that were valid from one date to another or are still valid ( picture will explain it all ). How can I get the prices that were valid between dates in textbox1 and textbox2? Desired output from query is in blue. And to complicate matters a bit more, there are three such tables with prices and the dates are not the same. Range that I'm interested in is the same for all three tables.

Thanks
 

Attachments

  • range_price.jpg
    range_price.jpg
    20.3 KB · Views: 166
You haven't really explained what you're trying to accomplish. We can see the image but what constitutes a valid product?
 
I'm trying to get the prices for product x and product y that were valid between 1.8.2012 and 31.8.2012. Those two dates aren't fixed, of course. Other two identical tables hold transport price and discount, with different prices for different dates. The final product should be the price for which some product was sold between two arbitrary dates. So, I'm interested in price for the product in my time range, not the product. The main problem is that the dates in all the tables are not the same, so I must find out which set of prices was "good" at the time.
 
What do you mean by valid? Both from and to dates fall between the range entered? Show us some sample data and what you expect from it.
 

Users who are viewing this thread

Back
Top Bottom