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.
Author |
Topic |
MikeTex
Starting Member
3 Posts |
Posted - 2011-01-12 : 18:00:40
|
I have a table of employees numbered 001 to 999, I need that in this table are the records altered so that they begin to be numbered from 0001 to 9999, changing existing ones from 001 to 0001 ...Can anyone help me please.Thanks.MikeTtx |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-01-12 : 18:19:44
|
why not just use an int data type instead of monkeying around with characters types to hold numbers? |
|
|
MikeTex
Starting Member
3 Posts |
Posted - 2011-01-12 : 19:12:12
|
how do I do that?ThanksMikeTtx |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
dataguru1971
Master Smack Fu Yak Hacker
1464 Posts |
Posted - 2011-01-12 : 19:37:01
|
Change the column to int datatypeAlter Table [TableName] alter column [columnname] int not null Poor planning on your part does not constitute an emergency on my part. |
|
|
MikeTex
Starting Member
3 Posts |
Posted - 2011-01-13 : 02:56:57
|
No problem about more than 9,999 employees, the Database owner only want's it this way, because this Database will not be used for mutch more time. That way they want to only add a leading zero.Thanks alot.MikeTtx |
|
|
|
|
|