I'm tryi,g to do a lookup with an input value and hasf file reference.
This hash file reference contains ranges values, this an simple example :
-------------------------
column1|column2
------------------------
1 to 10 |low
11 to 20|middle
21 to 30|high
So if input value is 9 the result will be "low", and if it's 25 the result except would be "high".
I know that I can generate all values (1,2,3,...30)and then perform my lookup directly...
But is it possible to do a lookup with value and range value ?
Is there a database involved anywhere here? You could easily construct a table holding range name, low value and high value and then join to this on the way out using 'between' logic...
-craig
"You can never have too many knives" -- Logan Nine Fingers
Even if a database is not involved, this data can be loaded into a temp table and then a user defined sql can be written on it. I think going this way would turn out to be a very dynamic/flexible solution in which you dont need to hardcode the range values.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Even if a database is not involved, this data can be loaded into a temp table and then a user defined sql can be written on it.
I agree with DSGuru, but instead of going for the database way, you can get it done through the Universe Stage (instead of your Hashed File) and do a range lookup there.
Success consists of getting up just one more time than you fall.
As you have only 3 rows in lookup get all row in tansformer by hard coding column2 values and use Field() function and extract numeric values from column1(as you fix string like 1 to 10) and check input against that range....
hope this will work...