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 |
0341
Starting Member
21 Posts |
Posted - 2008-06-05 : 09:12:23
|
I have a list of 9 and 10 digit numbers that are actually a data type varchar. I need to strip out the first three digits in each number and I'm not sure how. Any help would be greatly appreciated.-Phil |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-05 : 09:15:23
|
SELECT SUBSTRING(field,4,LEN(field)) FROM Table |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-05 : 09:15:48
|
Strip out?You mean EXCTRACT and DISPLAY the first three digits?Or do you mean you want to delete the first three digits and keep the remaining? E 12°55'05.25"N 56°04'39.16" |
 |
|
0341
Starting Member
21 Posts |
Posted - 2008-06-05 : 09:16:34
|
delete the first three digits |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-06-05 : 09:51:26
|
UPDATE Table1SET Col1 = STUFF(Col1, 1, 3, '') E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|