Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

to_char suppress leading spaces and trailing zero's

$
0
0

Hello,

 

I am pulling latitude and longitude from a server that has the values in numeric format using a match transform and candidate selection. As part of my SQL, I have the following code:

 

    to_char(Rtrim(LATITUDE, '99.999999')) as LATITUDE,

    to_char(Rtrim(LONGITUDE, '99.999999')) as LONGITUDE,

 

My return ends up with a leading space and a trailing zero. ("42.0452" returns as "42.045200").

 

What am I doing wrong?

 

Joe


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>