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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query help

Status
Not open for further replies.

rukk

Programmer
Dec 29, 2003
38
US
I have a table with values like
Amount Value
------ -----
3000 0
25000 13
75000 38
1254000 75
3,000,00.00 95
3,000,00.01 100

I want to add the "Value =0" to the table if my Total is <= 3000
If the Total <=75000 then Value=38

How to write a query which should populate the user "Enter Total" and based on the total it should give the "Value"


 
Something like this ?
SELECT Min(Value) FROM theTable WHERE Amount>=theTotal

Hope This Help, 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