Digit

accessman2

Registered User.
Local time
Today, 06:23
Joined
Sep 15, 2005
Messages
335
In the table,

Can we setup the format in the field?

I want to setup 0000, four digits, int datatype.

the user just input 1, 2, or...etc.

then it will show like this in the table.
0001
0002
.....

Can we do that?
 
Set the data type of the field to Number > field size : long integer and format > 0000


Btw why is this thread posted in SQL server, shouldn't it be in General .
 
Btw why is this thread posted in SQL server, shouldn't it be in General .

Have I missed something - I assume he has a SQL server table?
 
Declare @tr Int
Set @tr = 4
Select Replicate('0',4-LEN(@tr)) + CONVERT(VARCHAR,@tr)
 

Users who are viewing this thread

Back
Top Bottom