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!

Need SQL statement 2

Status
Not open for further replies.

LannyB

Technical User
Nov 13, 2007
6
US
I have a table CURTRAN with a column PRVPMT. I am trying to identify any numbers in the PRVPMT column that have more than 2 decimal places, i.e. 100.123
 
Lanny,

You can use a variant of this code:
Code:
select * from lanny;

     X
------
15.687
105.25

select * from lanny
where round(x,2) <> x;

     X
------
15.687
Let us know how you like this method.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Santa,

I was investigating the use of trunc, followed by a nasty cast to a string, followed by a length - yeeew!

Please accept a star for elegant simplicity.

Regards

T

Grinding away at things Oracular
 
Thanks, Santa! Christmas came early and it's greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top