Any suggestions??

  • Thread starter Thread starter rblivewire
  • Start date Start date
R

rblivewire

I need to create a query. I have 3 columns. "Match column", "Date
column", and "field 1" which counts from 1 to 1000. The numbers in the
"match column" are jumbled around. I need a query that looks through
the match column and matches the number it finds with the field 1
number and the returns the date that is next to the field 1 column.
What is the best function to use?
 
Hello "rblivewire".

rblivewire said:
I need to create a query. I have 3 columns. "Match column",
"Date column", and "field 1" which counts from 1 to 1000.
The numbers in the "match column" are jumbled around. I need a
query that looks through the match column and matches the number
it finds with the field 1 number and the returns the date that is next
to the field 1 column. What is the best function to use?

Maybe something like this:
select t1.[match column], t2.[Date column]
from yourtable as t1 inner join yourtable as t2
on t1.[match column] = t2.[field 1]
 
Are you saying you want to find the records in which the values of
[MatchColumn] and [Field1] are identical?

First, are both the same data type? If not, you'll need to "coerce" one of
them to the other type in your query (see CStr() or CInt() or other
"c"onversion functions).

Next, in your query, could you use the name of the column to which you want
a match as your criterion? For example, use [Match Column] as the criterion
under [Field1]...

Finally, if you only want the [DateColumn] to display, leave that field
checked in your query and uncheck the other(s).

--
Regards

Jeff Boyce
Microsoft Office/Access MVP


Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top