troubleshooting Question

concatenate float to string asnd get four decimal points

Avatar of xav056
xav056 asked on
Microsoft SQL ServerSQL
5 Comments2 Solutions818 ViewsLast Modified:
Hello
I have two floats with different decimal points some are 3 decimal points and some are 8 decimal points
I haave two float columns in the table and What I would like to do
Is get valuecol(1)-->convert it to varchar(with 4 decimal points, so if the originalvalue is 3 decimal points the converted varchar should be 4 decimal points) then concatenate this to the converted value of col(2) which will be the same format
and finally get both as converted(col1)_Coverted(col2)
For xample:
lets say I have float1= 1234.234
                         float2= -2.345678
I would like to get a string(1234.2340_-2.3456)
How do I do that?

Thanks
ASKER CERTIFIED SOLUTION
Aneesh
Database Consultant
Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros