Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display numbers based on % difference

Status
Not open for further replies.

TSO456

Technical User
Jul 23, 2001
57
0
0
US
I have a column in Access 2002 that contains different amounts of ($) Assets. I need query that can loop through the values in the column and show me the assets amount that have a diffrence of 5%. In the example below the values 100 and 105 should be the result.

$Assets
$300.00
$250.00
$100.00
$105.00
$125.00
$89.00
 
Are you comparing every occurence to every other occurence?
 
Yes I am comparing each number to the rest of the numbers in the column.

Thanks
Jill
 
This may be a long run query...
Provided you have a primary key, say ID, you may try this:
SELECT ID, Assets FROM tblAssets A WHERE EXISTS
(SELECT Assets FROM tblAssets B WHERE B.ID<>A.ID
AND B.Assets Between (0.95*A.Assets) And (1.05*A.Assets)
);

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top