Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 21st, 2012, 04:02 PM
Authorized User
Points: 168, Level: 3
Points: 168, Level: 3 Points: 168, Level: 3 Points: 168, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2008
Location: New Market, Maryland, USA.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 01:50 AM
permanently delete straight away in Windows crmpicco HTML Code Clinic 2 October 7th, 2005 09: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 02:24 AM
Fill Factor and Pad Index bmains SQL Server 2000 0 February 3rd, 2004 02:15 PM



All times are GMT -4. The time now is 06:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.