Link to home
Start Free TrialLog in
Avatar of MariaHalt
MariaHaltFlag for United States of America

asked on

Format int to varchar in a specific way

Hey, I have an int field that has values between 0 and 9999.  I want to convert it to a varchar(4) so that values less than 1000 appear with leading zeroes.  For example, a value of 25 would appear 0025 or 789 would appears as 0789.  I want to do this in a select statement.  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MariaHalt

ASKER

Perfect!  Thank you.
Thanks for the grade.  Good luck with your project.  -Jim