Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 data issue

Author  Topic 

sqldba2k6
Posting Yak Master

176 Posts

Posted - 2007-07-11 : 11:20:47
can i store a value with 01 for bigint type.
when i m inserting it is truncating the leading zero's
like storing 1.

With varch we can store 01 but is there a way where we can store the value with 01 for bigint.

Table

TID bigint

TID
--
1
2

Required output

Table

TID bigint

TID
---
01
02


Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2007-07-11 : 11:24:34
You are confusing how they are stored with how they are displayed.

Formatting with the leading zeros should normally be done in your front-end application.




CODO ERGO SUM
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-07-12 : 00:48:16
Where do you want to show data?
If you use VB, then make use of Format function

Format(Rs("col"),"00")

will do what you want

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -