Jump to content
CHITOWN

SQL Query

Recommended Posts

Is there a way to write a sql query that contains a decimal column, currently set to 2 decimals, to give me results that the hundredths column doesn't end in zero and excludes .25, .75.   For example, finding .35 but not .25 or finding .83 but not .80.   Any select statement to find those records is what I am looking for as I have tried where cast(hours as decimal(10,2)) - hours > 0 
 but brings me back decimals ending in zero as well as .25 and .75.   Thanks.

 

Share this post


Link to post
Share on other sites

Decimal and date time are not compatible, one works in divisions of 10 the other in divisions of 60.

Is 1.25, 1 hour 25min or 1 hour 15mins. If you are dealing with time use YEAR(), MONTH() etc, to get true, less confusing, datetime value

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...