editolis
Panathinaikos Fun
- Local time
- Today, 14:28
- Joined
- Oct 17, 2008
- Messages
- 107
Hi All,
I Need a help with a qry.
I have 2 tables and they are connected by nID. The table 2 is made by previous qry.
The first table have 200 rows and the second have 50.000 rows.
Each one have a column named DiffA with double numbers like: 2,02 – 7,89 – 15,01 etc…
I Want from the table 1 to find the 3 closest numbers from the table 2 for all 200 rows (nID's).
For example table 1 with nID: 100 and DiffA: 3,04
The result must be from table 2 with nID: 100 to show me 3 results like: 3,04, 3,03 and 3,05. (if exist) or (if they don’t exist) the closest numbers like 3,08 etc.
I Think that I need a Public Function but I don’t know how to do it.
Thank you in advance.
I Need a help with a qry.
I have 2 tables and they are connected by nID. The table 2 is made by previous qry.
The first table have 200 rows and the second have 50.000 rows.
Each one have a column named DiffA with double numbers like: 2,02 – 7,89 – 15,01 etc…
I Want from the table 1 to find the 3 closest numbers from the table 2 for all 200 rows (nID's).
For example table 1 with nID: 100 and DiffA: 3,04
The result must be from table 2 with nID: 100 to show me 3 results like: 3,04, 3,03 and 3,05. (if exist) or (if they don’t exist) the closest numbers like 3,08 etc.
I Think that I need a Public Function but I don’t know how to do it.
Thank you in advance.