Convert Numberic(11,3) Leading Zero's and Remove Decimal

allanau20
allanau20 used Ask the Experts™
on
Hi Experts,

Need to add leading zeros and remove the decimal for a field w/format numberic(11,3).

sample data     converted data
-----------          -------------------
1234.123        00001234123
123.120          00000123120
9.900              00000009900
456.000          45600000000

TiA!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Chief Technology Officer
Most Valuable Expert 2011
Commented:
Hello allanau20

Try like this.

Regards,

mwvisa1
select right(replicate('0', 11)+replace(your_column, '.', ''), 11)

Open in new window

Author

Commented:
purfect!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial