Select Integers only

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

Guest

I have a field that has integer and non-integer data. For this one query, I
need to select out only the integer values. How do I make a query ingore any
value that has a decimal attached? (I don't need to round... I only want to
select the whole numbers.)

Thanks in advance for any help you can provide!
Cathy
 
How do I make a query ingore any
value that has adecimalattached?

Set the criteria for your field like this ---
Int([YourFieldName])

More likely:

FIX(YourFieldName)

e.g.

SELECT INT(-9.99), FIX(-9.99)

returns -10 and -9 respectively.

Jamie.

--
 
As I understand it, you don't want to include any value that includes a
decimal, e.g. 9.99 would be excluded, not rounded. If this is the case try
this as the criteria for your number field:

[YourFieldName]=Int([YourFieldName]

Bob



Jamie said:
How do I make a query ingore any
value that has adecimalattached?

Set the criteria for your field like this ---
Int([YourFieldName])

More likely:

FIX(YourFieldName)

e.g.

SELECT INT(-9.99), FIX(-9.99)

returns -10 and -9 respectively.

Jamie.

--
 
As I understand it, you don't want to include any value that includes a
decimal, e.g. 9.99 would be excluded, not rounded. If this is the case try
this as the criteria for your number field:

[YourFieldName]=Int([YourFieldName]

On reflection, I think your are probably correct that the OP wants to
apply a search condition (i.e. WHERE clause) rather than perform a
data transformation (i.e. SELECT clause), in which case INT and FIX
will work equally well :)

Jamie.

--
 

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