Link to home
Start Free TrialLog in
Avatar of zachvaldez
zachvaldezFlag for United States of America

asked on

Rounding off numbers not to display any decimals

I imported data from excel into SQL server  and the numbers were rounded off in Excel. After importing, the numbers displayed in 2 decimal places. How will I rounded of the numbers back so the sql output is similar to its original excel values
SOLUTION
Avatar of Russ Suter
Russ Suter

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zachvaldez

ASKER

I just imported the file and no idea how it was formatted.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I found out that when you import and excel to sql, the data types  were float. It could be the reason, why there were decimal places.
I renamed the data types to integer and found out it fixed the problem.
That's what I told you in my first comment:
It might have with the column data type in SQL Server. What are you using?
Solved