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 8210465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:04:45+00:00 2026-06-07T10:04:45+00:00

Table1 Id value 001 2.3 002 1.3 003 3 004 5.3 … … value

  • 0

Table1

Id value

001 2.3
002 1.3
003 3
004 5.3
...
...

value column datatype is float

Note:

value column will be .3 always, it will not come like .1, .2, .4, .5 to .9

Now i want to display .5 instead of .3 for all the values…

Expected Output

Id value

001 2.5 
002 1.5
003 3
004 5.5
...
...

How to make a query for this.

Need SQL Query Help

  • 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-06-07T10:04:47+00:00Added an answer on June 7, 2026 at 10:04 am

    Use Round function to get your result

     Declare @Sample Table
     (ID int ,
     value float)
    
     Insert into @Sample
     values
    (001,2.3),(002,1.4),(003,3),(004,5.3)
    
     Select ID,round(value/5,1)*5 from @Sample
    

    If the value is greater than .3 then it will be rounded to .5 and if it is less than .3 then the integer value will be retrieved

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

Sidebar

Related Questions

Using Access 2003 Table1 ID Name Value 001 Raja 100 002 Ramu 200 004
Using SQL Server 2000 table1 id values (datatype is nvarchar) 001 12:10 002 01:25
Using Sql Server 2005 Table1 ID Name Value 001 Rajesh 90 002 Suresh 100
Table1 ID Division Dept 001 CS IT 002 CD Admin 003 AS Admin I
Using SQL Server 2000 Table1 ID date value 001 23/01/2012 100 002 25/02/2012 200
Scenario: I have a table1(col1 char(5)); A value in table1 may '001' or '01'
Using MySQL ID Date 001 2010-08-01 002 2010-08-15 003 2010-08-22 ... .... Query select
Using SQL Server 2000 table 1: ID LastDate 001 20090101 003 20090501 004 20090302
Using Sql Server 2005 Table1 ID Value ABC001 BCE002 ... I have search column,
I have these tables and values: Table1 ------------------------ ID | Value ------------------------ 2 |

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.