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 |
|
cmorgan007
Starting Member
1 Post |
Posted - 2011-05-17 : 09:59:02
|
| My technical guy is away and I'm stuck. I need to run an SQL Query on a particular table. When in the table instead of opening if I go to 'open table- query' I need to remove the first character from a column. The column is called 'number' The column currently contains numbers i.e 07900666666 and I wish to remove the first number '0'.can some kind soul send me the query that will achieve this.Thanks |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-05-17 : 10:13:12
|
| UPDATE yourTableSET NumberColumn = CASE LEFT(NumberColumn ,1) WHEN '0' THEN SUBSTRING(NumberColumn,2,LEN(NumberColumn)-1) END--------------------------http://connectsql.blogspot.com/ |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|