Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to dynamically add leading zeros in sql query

$
0
0

how to dynamically add leading zeros in the below sql query.

 

selectreplace(convert(CHAR(12),CAST(65.90ASDecimal(12,2))),'.','')

65.90 is money data type column

I am getting the output like 6590,but i need to get 000000006590.How to do this?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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