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 |
|
james_w
Starting Member
21 Posts |
Posted - 2004-07-14 : 09:54:49
|
| I have a column of postcodes which i need to convert to postal sectors.e.g:DA9 9HLDA9 9ATDA10 0BWDA10 0JYDA9 9HFto convert these to postal sectors i need to show all except the last 2 characters in the field. I can get it to show the first 5 or 6 characters but because the postcodes have a varying amount of characters it is not correct.e.g:DA9 9DA9 9DA10 0DA10 0DA9 9Can anyone help with this please it's driving me mad. |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-07-14 : 10:25:32
|
| Select left(postCode,len(postCode)-2)Corey |
 |
|
|
james_w
Starting Member
21 Posts |
Posted - 2004-07-14 : 10:37:19
|
| Thanks Corey, it's working fine.I appreciate your help...James. |
 |
|
|
|
|
|