View Single Post
  #1  
Old April 7th, 2005, 03:57 PM
xopher
external usenet poster
 
Posts: n/a
Default "dynamic" column lookup

I need to use the value in one field to determine which column in another
table needs to be used to retrieve the corresponding value. In detail, I
have a table which has different values for each time period for each day of
the week, e.g., Monday from 9-12 has one value, Tuesday from 3-6 has another
value, etc. resulitng in 8 values for each day for a total of 56 different
values (columns). These values are different for each record. Based on a
time stamp, I need to identify which column I need to use for a value. For
example, if the result of my time stamp is Friday 9-12, then I would like to
be able to do something like - Value = Table_Name.Column (Friday 9-12), where
Friday 9-12 is the results of my time stamp analysis. Is this possible? I
am looking for something similar to the Indirect function in Excell. Any
help would be much appreciated.