Jump to content

TLJ232


tlj232

Recommended Posts

I have a field in an Access database table that holds a decimal (9,2) - dollars and cents.  I need to analyze only the records where the cents are greater than .00. I have tried splitting the data field but am unable to identify the correct SQL query commands to do this - any suggestions?  I have tried the split() function, but no luck.  Any advice will be greatly appreciated.  Thank you

Link to comment
Share on other sites

You might be able to do something like this.

SELECT myFieldA
FROM myTable
WHERE (myFieldA - Trunc(myFieldA, 2) <> 0);

Anything with a 0 decimal should end up as 0 and would be omitted. You can reverse this by changing <> to =

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...