Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi I am using Aggregator on sou

Status
Not open for further replies.

ProDev

Programmer
Jul 9, 2003
51
US

Hi
I am using Aggregator on source table to choose the record having max SeqNo. Then, based on the StartTime & EndTime Column values of this perticular chooen record, I have to get set up records of certain table in target.

So, I did a look up (on target table) and did link the ports from the Aggregator. LookUp condition was kept as RecordDate ( the LKP column) >= StartDate (from Aggre)
and RecordDate <= EndDate.

Now, I am geting only one record retrieved in such case though there are thousands in target table fo this time range.

I believe LookUp (on target) is not the right option in my case as it gives back LastValue /FirstValu matched record or so ......

Then, what would be the way to handle this (geting target table reords for this range)


Thanks
 
Nope, this is not a good strategy, lookups will indeed just return the first or the last occurence from a table, not a range.
So, use two lookups, one for starttime and one for endtime and use the table you want the range from as another source.
I guess that a normal join between those tables is out of the quaestion, so create a dummy port to join the two input sources. After the joiner use the values from the lookups to flag the records you need. Use a filter to only pass those records and then write them to target.

This may sound a bit cryptical, so drop me a mail if you want an example...

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top