numbers query

P

Paul M

Hi
In a query I have set up you can search for sponsorship
amount up to a certain amount, for example if you search
on upto £50,000 you get results equal and below
£50,000, for example £20,000,£10,000
This was achieved with <= in the sql statement.This is
what I want for upto £500,000 but then After that I want
to search for any amount above £500,000.
My search drop down box is like

Upto 20,000
upto 50,000 etc
500,000 plus

Any ideas
Best wishes
Paul M
 
D

Don

Try the greater than >=

Should work...

Don
====================
Hi
In a query I have set up you can search for sponsorship
amount up to a certain amount, for example if you search
on upto £50,000 you get results equal and below
£50,000, for example £20,000,£10,000
This was achieved with <= in the sql statement.This is
what I want for upto £500,000 but then After that I want
to search for any amount above £500,000.
My search drop down box is like

Upto 20,000
upto 50,000 etc
500,000 plus

Any ideas
Best wishes
Paul M
 
D

Don

Hi Paul,

It might look something like...

fp_sQry="SELECT * FROM tablename WHERE (amount > ::amount:: AND amount =
::amount::)"

Table name is the name of your table and "amount" is the field name in the
database table.

Hope this helps

Don
=============================
Thanks Don but how can I fit it in with the SQL already
there.
as an idea is it possible for the query to return a value
inc the text of(above £500,000)
something like if amount_required > 500000 then write
(above £500,000), Can SQL be made to write something not
in the database if a value is realized

Here is the SQL I have now

SELECT Format([Amount_required],'Currency') AS
fmtAmount_required, FROM Results
WHERE (Amount_required <= ::Amount_required::


Thanks Paul M
 
D

Don

OK I will use your example... (he says after re reading it)

SELECT Format([Amount_required],'Currency') AS
fmtAmount_required, FROM Results
WHERE (Amount_required < ::Amount_required:: AND Amount_required =
::Amount_required::)"

That should do it...

Don
================
Thanks Don but how can I fit it in with the SQL already
there.
as an idea is it possible for the query to return a value
inc the text of(above £500,000)
something like if amount_required > 500000 then write
(above £500,000), Can SQL be made to write something not
in the database if a value is realized

Here is the SQL I have now

SELECT Format([Amount_required],'Currency') AS
fmtAmount_required, FROM Results
WHERE (Amount_required <= ::Amount_required::


Thanks Paul M
 
D

Don

One more time... It never pays to be in a hurry..

SELECT Format([Amount_required],'Currency') AS
fmtAmount_required, FROM Results
WHERE (Amount_required < ::Amount_required:: OR Amount_required =
::Amount_required::)"

The and should be an OR
Sorry for all the confusion on my part...
Don
========================
| OK I will use your example... (he says after re reading it)
|
| SELECT Format([Amount_required],'Currency') AS
| fmtAmount_required, FROM Results
| WHERE (Amount_required < ::Amount_required:: AND Amount_required =
| ::Amount_required::)"
|
| That should do it...
|
| Don
| ================
| | Thanks Don but how can I fit it in with the SQL already
| there.
| as an idea is it possible for the query to return a value
| inc the text of(above £500,000)
| something like if amount_required > 500000 then write
| (above £500,000), Can SQL be made to write something not
| in the database if a value is realized
|
| Here is the SQL I have now
|
| SELECT Format([Amount_required],'Currency') AS
| fmtAmount_required, FROM Results
| WHERE (Amount_required <= ::Amount_required::
|
|
| Thanks Paul M
|
|
| >-----Original Message-----
| >Try the greater than >=
| >
| >Should work...
| >
| >Don
| >====================
| message
| >| >Hi
| >In a query I have set up you can search for sponsorship
| >amount up to a certain amount, for example if you search
| >on upto £50,000 you get results equal and below
| >£50,000, for example £20,000,£10,000
| >This was achieved with <= in the sql statement.This is
| >what I want for upto £500,000 but then After that I want
| >to search for any amount above £500,000.
| >My search drop down box is like
| >
| >Upto 20,000
| >upto 50,000 etc
| >500,000 plus
| >
| >Any ideas
| >Best wishes
| >Paul M
| >
| >
| >.
| >
|
|
 

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

Top