Wrox Programmer Forums
BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 Discuss the book Beginning Microsoft SQL Server 2008 Programming, Robert Vieira, ISBN: 978-0-470-25701-2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft SQL Server 2008 Programming ISBN: 978-0-470-25701-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 21st, 2012, 03:02 PM
Authorized User
Join Date: Jun 2008
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default permanently zero pad a number

I am trying to zero pad a number with 10 zeros. The code below does what I want, but I can not update the table permanently. How can I do this? Thanks for any help!!!

SELECT Paddednumber =RIGHT(REPLICATE('0',10)+CAST(Number ASVARCHAR(10)),10)
FROM dbo.Employee

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exception in thread "main" javax.crypto.BadPadd?ingException: pad block corrupted boy18nj BOOK: Beginning Cryptography with Java 9 June 6th, 2011 12:50 AM
permanently delete straight away in Windows crmpicco HTML Code Clinic 2 October 7th, 2005 08:52 AM
Delete variable permanently Mantis PHP How-To 3 December 14th, 2004 08:23 AM
Incorporate Signature thru Digital Pad ashu_gupta75 Classic ASP Basics 0 May 14th, 2004 01:24 AM
Fill Factor and Pad Index bmains SQL Server 2000 0 February 3rd, 2004 02:15 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.