tags:

views:

126

answers:

1

I'm interested in finding the most precise decimal values in a database field. I'd like to be able to sort results by descending precision. Is this possible?

e.g.

10.1781253 12345.12435 89.763 1.1 2

A: 

You need to order by the substring of the part after any dot. This is going to be a DB specific SQL query and since you didn't mention which one you're using I can't give a detailed SQL example.

BalusC
I was hoping for vanilla SQL, but the DBMS is Oracle.
Sorry, never used it extensively. I can only for MySQL, PostegreSQL and DB2 tell from head how to do it. But I think you already know/understand where to look for the solution. Good luck.
BalusC
yes - thanks for the help!