December 2, 2002 at 11:15 am
New to SQL Server but... Am I missing something or is it impossible to create any type of numeric column that will support leading zeros?
December 2, 2002 at 3:47 pm
To have a number with leading zeros you'll need to define the field as char or varchar.
Are the leading zeros required for a genuine business need, or just display purposes?
If you just need to display the number with leading zeros, I'd store the data without the zeros and then have the presentation layer add them when displaying the record.
Thanks
Phill Carter
--------------------
Colt 45 - the original point and click interface
December 2, 2002 at 4:05 pm
Thanks Phil,
I'm taking feeds from different sources (several different database engines). The leading zeros come to me in several different columns and must be maintained to keep in synch with those other databases. So it's not just a display issue.
Thanx,
Wally
December 2, 2002 at 7:16 pm
Duplicate post, see additional responses in http://www.sqlservercentral.com/forum/topic.asp?TOPIC_ID=8535&FORUM_ID=23&CAT_ID=2&Topic_Title=Leading+Zeros&Forum_Title=General
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply