Finding similar records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a database of retail properties. I need to create what I think is a
fairly simple query to find "similar" properties. I am comparing square feet
and sales volumes. I have set created a query where the user inputs the
ranges, but I'd like to have this done automatically. For instance:

We have a new location which is 20,000 square feet and has a projected sales
volume of $3,000,000. I'd like the query to find the closest match(es) to
this. The criteria would be +/- 5,000 sq. ft. and +/- $500,000.

Is there a way to do this?

Thanks in advance.
 
Hello,

I have a database of retail properties. I need to create what I think is a
fairly simple query to find "similar" properties. I am comparing square feet
and sales volumes. I have set created a query where the user inputs the
ranges, but I'd like to have this done automatically. For instance:

We have a new location which is 20,000 square feet and has a projected sales
volume of $3,000,000. I'd like the query to find the closest match(es) to
this. The criteria would be +/- 5,000 sq. ft. and +/- $500,000.

Is there a way to do this?

Thanks in advance.

Try a criterion on [Square feet] of
= [Enter square feet:] - 5000 AND <= [Enter square feet:] + 5000

and similarly for the volume.

John W. Vinson [MVP]
 
D. M. said:
Hello,

I have a database of retail properties. I need to create what I think is a
fairly simple query to find "similar" properties. I am comparing square feet
and sales volumes. I have set created a query where the user inputs the
ranges, but I'd like to have this done automatically. For instance:

We have a new location which is 20,000 square feet and has a projected sales
volume of $3,000,000. I'd like the query to find the closest match(es) to
this. The criteria would be +/- 5,000 sq. ft. and +/- $500,000.

Is there a way to do this?

Thanks in advance.

D.M.,

It would look a little like the following (not tested).

SELECT <your columns>
FROM <your table> AS T1
WHERE [Square Feet]
BETWEEN (T1.SquareFeet - 5000)
AND (T1.SquareFeet + 5000)
AND [Projected Sales]
BETWEEN (T1.ProjectedSales - 500000)
AND (T1.ProjectedSales + 500000)

Or possibly:

SELECT <your columns>
FROM <your table> AS T1
WHERE ([Square Feet]
BETWEEN (T1.SquareFeet - 5000)
AND (T1.SquareFeet + 5000))
AND ([Projected Sales]
BETWEEN (T1.ProjectedSales - 500000)
AND (T1.ProjectedSales + 500000))


Sincerely,

Chris O.
 
Back
Top