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 |
causative
Starting Member
2 Posts |
Posted - 2013-11-13 : 11:23:29
|
HelloMy postcode format in my database is: 20470 and I use the following query to transform it to format: 20-470((substring((STR(postcode)),6,2)+'-'+substring((STR(postcode)),8,3)))Is it possible to do in another way? |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-11-13 : 11:33:44
|
one way:stuff(postcode, 3, 0, '-')Be One with the OptimizerTG |
|
|
causative
Starting Member
2 Posts |
Posted - 2013-11-13 : 11:44:33
|
that is the pointthx a lot |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2013-11-13 : 13:56:40
|
you're welcome. You should use books online often - it is very helpful for exploring things like this. For example here are string functions.Be One with the OptimizerTG |
|
|
|
|
|