MikeCopeland
Programmer
Using CR XI...
I need to do something with a multi-table database that isn't possible via SQL logic, and I'm wondering if it's possible at all. The requirement is to select the "best fit" of several records in a table and use that to acquire data. Here's an example:
Table1 Table2
---------------------------------------------
ID: 12345 L1: 12345 D1: 02/04/2008 etc.
ID: 34567 L1: 12345 D2: 03/22/2008 "
L1: 12345 D3: 04/17/2008 "
L1: 12345 D4: 05/07/2008 "
L2: 34567 D2: 03/27/2008 "
Here I want to find/link via the record in Table2 that is _closest_ to a date parameter I'm using. In this case, the date is 3/15/2008, so I want to find L1.D2 and L2.D1 (there is only 1 Table2.L2 record).
My "guess" is that I might use a Group formula (am I close?), but I don't know how to do such a thing in CR. Any thoughts? TIA
I need to do something with a multi-table database that isn't possible via SQL logic, and I'm wondering if it's possible at all. The requirement is to select the "best fit" of several records in a table and use that to acquire data. Here's an example:
Table1 Table2
---------------------------------------------
ID: 12345 L1: 12345 D1: 02/04/2008 etc.
ID: 34567 L1: 12345 D2: 03/22/2008 "
L1: 12345 D3: 04/17/2008 "
L1: 12345 D4: 05/07/2008 "
L2: 34567 D2: 03/27/2008 "
Here I want to find/link via the record in Table2 that is _closest_ to a date parameter I'm using. In this case, the date is 3/15/2008, so I want to find L1.D2 and L2.D1 (there is only 1 Table2.L2 record).
My "guess" is that I might use a Group formula (am I close?), but I don't know how to do such a thing in CR. Any thoughts? TIA