SQL Language (MOSC)

MOSC Banner

Select first n significant figures in a number SQL

edited Jan 21, 2014 4:10PM in SQL Language (MOSC) 2 commentsAnswered
Hi,

I have a requirement as per which I need to select the first n significant figures in a number regardless of the position of decimal. The normal rounding off rules should apply.

Example- For 5 significant digits

  1. 12.3000000 should give 12.3 (or 12.300)
  2. 0.000123453 should give 0.00012345
  3. 0.000123456 should give 0.00012346

Please can someone suggest an approach to achieve this.

Thanks,

Abhishek Chauhan

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center