there is a table T, containing two fields product_id and date_of_production and a table product_info, containing columns product_id, a number of columns describing product and product#BGN and product#END columns, so for each product we have quite different properties dependent on date of production. The problem is to map many-to-one in such a way, that the resulting select would have the following on condition:
on T.product_id = product_info.product_id and T.date_of_production between product_info.product#BGN and product_info.product#END
OR:
on T.product_id = product_info.product_id and T.date_of_production > product_info.product#BGN and T.date_of_production<product_info.product#END
|