Digit (1 Viewer)

accessman2

Registered User.
Local time
Today, 00:44
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?
 

Ron_dK

Cool bop aficionado
Local time
Today, 09:44
Joined
Sep 5, 2002
Messages
2,141
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 .
 

Pauldohert

Something in here
Local time
Today, 00:44
Joined
Apr 6, 2004
Messages
2,101
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?
 

pdx_man

Just trying to help
Local time
Today, 00:44
Joined
Jan 23, 2001
Messages
1,347
Declare @tr Int
Set @tr = 4
Select Replicate('0',4-LEN(@tr)) + CONVERT(VARCHAR,@tr)
 

Users who are viewing this thread

Top Bottom