W
WJ
Can the queries do something like the following:
Table VICC: contains columns like
Code 2004Price 2003Price 2002Price 2001Price
For a given Vehicle, there is a Code, and a Year
associated. What I want to do is: for any vehicle, look up
in the VICC table, using its Code and Year, the price of
the vehicle. If a price does not exist for a given year,
then look up in the year that is closest to the Year of
that vehicle, until a price is found. This process, I
think, involves using loops. But how to do it? I'm not
sure...
Thanks for any help.
WJ
Table VICC: contains columns like
Code 2004Price 2003Price 2002Price 2001Price
For a given Vehicle, there is a Code, and a Year
associated. What I want to do is: for any vehicle, look up
in the VICC table, using its Code and Year, the price of
the vehicle. If a price does not exist for a given year,
then look up in the year that is closest to the Year of
that vehicle, until a price is found. This process, I
think, involves using loops. But how to do it? I'm not
sure...
Thanks for any help.
WJ