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 |
|
Inno
Starting Member
33 Posts |
Posted - 2006-06-20 : 09:53:42
|
| In a table I have a coulmn of postal-codes where there is a space in the middle of the postcode. How do I do to trim them away? |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2006-06-20 : 09:55:06
|
| select replace('SE16 7TG', ' ', '')Ryan Randallwww.monsoonmalabar.com London-based IT consultancy Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
Inno
Starting Member
33 Posts |
Posted - 2006-06-20 : 09:56:57
|
| I dont understand. Each postal code in the column has a space in it and I have to remove it from every post. I cannot specify all and use replace. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-06-20 : 10:06:09
|
| Select replace(yourColumn,' ','') from yourTableMadhivananFailing to plan is Planning to fail |
 |
|
|
Inno
Starting Member
33 Posts |
Posted - 2006-06-20 : 10:16:04
|
| Ow thnx, didnt know one could specify an entire column there in the replace statement.But it doesnt solve my problem :( I want the spaces to get trimmed away from the table column and not just get a new list without them. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
Inno
Starting Member
33 Posts |
Posted - 2006-06-20 : 10:43:18
|
| Man it is too hot...thanks alot works fine :) |
 |
|
|
|
|
|