Avatar of Rmumpower00
Rmumpower00
 asked on

How do I Zero Fill a Result when I have a REPLACE Function in the Query

So, this is the last part of my Query where It pulls up the Amount the Check is for, removes the Decimal, but I need it to be Zero Filled to the Left up to 10 Digits.

This is the Part of the Query I have so far.
REPLACE (CAST(checknet AS VARCHAR(20)), '.',  '')

When the Result comes back, it will come back as follows:

0001234567890010000029974201202281833329

The very last part of that you will see 1833329 That is the check amount of $18,333.29

Because that is only 7 Digits, I need 3 Zero's to fill to the Right.

Thanks again for all of your guy's help!
Microsoft SQL Server 2008Microsoft SQL Server 2005

Avatar of undefined
Last Comment
Rmumpower00

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Kent Olsen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Rmumpower00

ASKER
Kent,
You are the man!  Thank you
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23