Bear2
asked on
Matching query in Access
Hi,
I need some help with a matching query in Access:
I have 2 tables: TableA and TableB which are not connected in the database. In TableA I have a column
ColumnA and want to find the closest values in ColumnB in Table B (not exact match).
I want the result of the query to display all values in ColumnA in one column and the closest values to each value in ColumnA in ColumnB in another column.
Thanks in advance!
I need some help with a matching query in Access:
I have 2 tables: TableA and TableB which are not connected in the database. In TableA I have a column
ColumnA and want to find the closest values in ColumnB in Table B (not exact match).
I want the result of the query to display all values in ColumnA in one column and the closest values to each value in ColumnA in ColumnB in another column.
Thanks in advance!
this would be easier to achieve in Excel, with a VLOOKUP call, and the final argument of TRUE to indicate an approximate match....
what are the data type of the columns ?
define closest match...?
give an example of the data and what you'd expect...
have you considered
select a.column,max(b.column)
from tablea as a
left outer join tableb as b
on a.column > b.column
group by a.column
order by 1
define closest match...?
give an example of the data and what you'd expect...
have you considered
select a.column,max(b.column)
from tablea as a
left outer join tableb as b
on a.column > b.column
group by a.column
order by 1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect solution
Thanks!
/gustav
/gustav
I'm looking for good examples for use of this method.
Would you mind telling me what this solution solved for you? Just the headline, no detailed data is needed.
/gustav
Would you mind telling me what this solution solved for you? Just the headline, no detailed data is needed.
/gustav
ASKER
Very simple. If you have created a table with input values and want to compare them with a table with standard values this solution helps with the grouping.
Thanks again Gustav!
Thanks again Gustav!
Very good, just what I needed. Thanks!
/gustav
/gustav