Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7445029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:43:24+00:00 2026-05-29T11:43:24+00:00

This one is pretty simple actually yet I wasn’t able to find anything useful.

  • 0

This one is pretty simple actually yet I wasn’t able to find anything useful.

In my SQL query I have some rounded numbers with a single scale value – round(number,1). If the numbers are rounded to some decimal digit it prints in the format ‘9,9’.

On the other hand if the numbers are rounded to an integer, only the integer value without the zero after comma is printed although I want my query to select the numbers in ‘9,9’ format even the decimal digit is zero.

In short, I think I need something like for example

to_char((select round(121.01,1), from dual), '*,1') ; to output 121,0.

What is the best way to do this? Thanks in advance

Korhan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:43:25+00:00Added an answer on May 29, 2026 at 11:43 am

    All you have to do is specify the number of decimal points you want in your to_char. The problem with using format masks is that you need to specify the number of numbers you want in front of your decimal point.

    SQL> select to_char(round(121.01,1),'999.9') from dual;
    
    TO_CHA
    ------
     121.0
    
    SQL> select to_char(round(121.4,1),'999.9') from dual;
    
    TO_CHA
    ------
     121.4
    
    SQL> select to_char(round(121,1),'999.9') from dual;
    
    TO_CHA
    ------
     121.0
    
    SQL> select to_char(round(5121,1),'999.9') from dual;
    
    TO_CHA
    ------
    ######
    
    SQL>
    

    There are a number of other formatting options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I need help. I'm usually pretty good at SQL queries but this one
I have a probably pretty simple question but I am still not sure! Actually
I'm writing my first NSEntityMigrationPolicy right now and this one is pretty simple. It
I've been pretty puzzled by this one. It seems as though my implementation of
Im still pretty new so bear with me on this one, my question(s) are
Normally I'm pretty competent with CSS but I just can't figure this one out...
This post reference to the One Definition Rule. Wikipedia is pretty bad on explaining
I'm reading this introductory book on parsing (which is pretty good btw) and one
I'm stuck on this and have been all day.. I'm still pretty new to
I have a pretty simple problem, but right now can't seem to see the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.